Is there any way to stop TAeroButtons from showing the underlined shortcut characters in their captions until the ALT key is pressed (i.e. default behaviour for a TButton). For example, a TAeroButton with a caption of "&Hello" will always display the 'H' underlined.
I cannot see this default behavior in TButton. Adding a default TButton on the form with caption set to '&Button' displays the caption at all times as Button . The same applies to TAeroButton.
Odd!? I've just created a new form, dropped a TButton and a TAeroButton on it and set their captions to "T&Button" and "T&AeroButton" and run the otherwise blank application. I'm shown a form with a pulsating Button with no underlined characters and an AeroButton with the 'A' underlined. If I press Alt, the underlining of the 'B' on the TButton fades in. I'm running C++Builder® XE Version 15.0.3953.35171 on Windows 7. Is it anything to do with my Windows theme settings or something?
Perhaps this is some Windows setting or perhaps it is some third party Windows utility causing this?
I have never encountered this before nor received any such similar remark from other users. Do you have another machine with which you can test this?
I think it's related to Windows theme's because if I create the test project mentioned above and uncheck the "Enable runtime themes" setting in Project Options -> Application then I see the old style flat, square buttons with the underlined character shown on both button types. The underlined character being hidden seems to be default behaviour on my PC for the standard Windows dialogs too. For example, right click on the desktop and select the "Screen Resolution" option to display the dialog and press the Left ALT key. On my PC the menu bar drops down at the top and the 'c' on the "Detect" button becomes underlined, along with the 'I' on the "Identify" button and various other characters on the dialog. Do you see this behaviour?
This wouldn't normally be an issue if all the buttons were consistent but we're in the process of re-designing the UI of our product so we're using the App/Form/Panel Stylers extensively. This has meant that we've had to use AeroButtons in a number of places to avoid having an ugly border around the buttons when they're shown on a styled background. In areas where this isn't an issue, we've left the original TButtons as we're reluctant to have to go through the entire code base and swap to TAeroButtons needlessly. Now we have the situation where some buttons display the shortcut underliing and some don't, so the appearance is inconsistent and we'd prefer to have the behaviour of the TButton if possible.
I was hoping there might just be a property or something that I'd missed so it would be an easy fix to make the AeroButtons behave like TButtons but I guess not!? Thanks for your help anyway. Regards, Matt
We have applied an improvement for this and the next update will have this improvement.
If it helps, I tried this in delphi xe2 and a standard button does not show the underline until the Alt key is pressed. However with a style applied the button shows the underline as soon as the program is run.
The tms buttons display the underline regardless of theme/styles being on or off.