Properties for Button on selection by "TAB", clicked & when app loses focus
-
Hello, I have 2 Buttons in my form. Both have background image and Flat style is "Flat". 1) On clicking TAB key, when the focus is on button, I see solid color rectangle inner, instead of solid border I want to have dotted border in the button. 2) If the button is on focus & the application loses focus (someother app is active), the button forms a outer border of white color. I want it to remain as it is i.e. dotted line inner rectangle. 3) When the button is clicked, some activity is going on. While this time the button text colro changes to grey. I don't want it to change the text color. I believe this is windows std property, but how do I not change the text color when the button is selected :~. I can't find any properties to set these points. What should I do to achieve the goal. Any help is highly appreciated.
Thanks & Regards,
-
Hello, I have 2 Buttons in my form. Both have background image and Flat style is "Flat". 1) On clicking TAB key, when the focus is on button, I see solid color rectangle inner, instead of solid border I want to have dotted border in the button. 2) If the button is on focus & the application loses focus (someother app is active), the button forms a outer border of white color. I want it to remain as it is i.e. dotted line inner rectangle. 3) When the button is clicked, some activity is going on. While this time the button text colro changes to grey. I don't want it to change the text color. I believe this is windows std property, but how do I not change the text color when the button is selected :~. I can't find any properties to set these points. What should I do to achieve the goal. Any help is highly appreciated.
Thanks & Regards,
1. This is Windows drawing the focus cue on the button. You cannot change this. 2. Again, Windows. Can't change this. 3. The text turns grey only because your code has to change it. This isn't Windows doing this or a property on the control. When you click on Windows Forms Button, no colors of or inside the button change at all, unless your code is specifically written to do this. [EDIT] 3. I haven't tested this, but this could be because of the Windows Desktop Theme your using.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak -
Hello, I have 2 Buttons in my form. Both have background image and Flat style is "Flat". 1) On clicking TAB key, when the focus is on button, I see solid color rectangle inner, instead of solid border I want to have dotted border in the button. 2) If the button is on focus & the application loses focus (someother app is active), the button forms a outer border of white color. I want it to remain as it is i.e. dotted line inner rectangle. 3) When the button is clicked, some activity is going on. While this time the button text colro changes to grey. I don't want it to change the text color. I believe this is windows std property, but how do I not change the text color when the button is selected :~. I can't find any properties to set these points. What should I do to achieve the goal. Any help is highly appreciated.
Thanks & Regards,
Thanks Dave, I created a custom Button and got rid of all the issues I had and got it the way I wanted it. Thanks alot to all.
Thanks & Regards,