I am having an issue with styling my buttons concerning the borders. I want to use hot tracking which is straight-forward enough. However, I want to remove the border that appears around the current control. I see plenty of states that I would think should apply but for the life of me I cannot find out how to turn off that border. I have tried making all borders transparent on every state in "Base" thinking that surely that would do it, but it doesn't.
There is another dashed/dotted border that I don't mind keeping although I can't find that either. Are these options configurable?
Hi,
My guess is that you are using themes (which are on by default) and therefore none of the appearances have any effect, since the Windows Theming API overrides all of them.
So set UseOsThemes to false.
You might also need/want to change the DisplayStyle on the button to a style that doesn't show borders.
I set UseOsThemes = false on the AllControls on the Properties of AllComponents. I see all of the other changes I made, I just can't figure out how to get rid of that extra border. I read the article about the focus rectangle but that is interior to the button area. This border is exterior.
I have tried to use a display style that turns off borders and that does get rid of the border, but it also removes the borders that I want to have.
If you simply want to eliminate the highlighting of the button's borders when you hover the mouse over the button you should be able to achieve that by setting the "SupportThemes" property of the button to false and setting the "UseHotTracking property of the button to DefaultableBoolean.True.
Did you mean that you wanted the button's borders which are there when the button is not being hovered over to disappear when you do hover over the button? If so, you should be able to achieve that by setting the "HotTrackAppearance.BorderAlpha" property of the button to Alpha.Transparent. (You will still need to set the other two properties mentioned above.)
Give that a try and let me know if that gives you what you want.
Michael S.