focus rectangle [modified]
-
hi all, I'm using VS.net2005 C#, I've class inherited from System.Windows.Forms.Button named PanelButton and FlatStyle is Flat, in run time when the PanelButton foucsed there is a rectangle displayed in the middle of button, i want to hide this rectangle..is it possible? plz i need any one have an idea to help me. thank you -- modified at 5:11 Sunday 27th August, 2006
-
hi all, I'm using VS.net2005 C#, I've class inherited from System.Windows.Forms.Button named PanelButton and FlatStyle is Flat, in run time when the PanelButton foucsed there is a rectangle displayed in the middle of button, i want to hide this rectangle..is it possible? plz i need any one have an idea to help me. thank you -- modified at 5:11 Sunday 27th August, 2006
Hello Yes of course in many ways.. The simplest one is to handle the paint event, and draw another rectangle over this one using the BackColor of your button. This should hide it. Regards:rose:
-
Hello Yes of course in many ways.. The simplest one is to handle the paint event, and draw another rectangle over this one using the BackColor of your button. This should hide it. Regards:rose:
-
hello, this may help if the button have a back color, but what can i do if the back color of the button is transparent? thank you
Hello This rectangle appears around the text in the middle of the button. So, take the value of the string when it changes, put it in a private field. Now, make the Text = "", and draw the text yourself from te string your've stored in the paint event.
Regards:rose:
-
Hello This rectangle appears around the text in the middle of the button. So, take the value of the string when it changes, put it in a private field. Now, make the Text = "", and draw the text yourself from te string your've stored in the paint event.
Regards:rose:
-
i'm fear to disturb you, my button already has no text in spite of that "This rectangle appears around the text space in the middle of the button." as u said thanks for reply
Hello No text!!:wtf: You are not making this any easy, are you? Alright! I'm out! I don't know!! What is this rectangle?? If there is no text in the button it shouldn't appear!! Something is wrong in this matter. I want to help, but, the last thing I got in my sleeves is a bit inconvenient. Don't give your button a focus. IIRC it would be
SetStyle(ControlStyles.Selectable, false);//or something
This way it won't get input focus, and you still can click it by the mouse -but not the keyboard- I hope this works, otherwise I'm moving to java!;P
Regards:rose: