Windows 7 SP1 x64
RAD Studio 10.1 Berlin Update 2
TMS VCL UI Pack v10.0.6.0
Hi,
I've encountered some strange behaviours with the TAdvGlowButton.
My goal here is to have two (or more) TAdvGlowButton act has cancellable radio-button (One button for positive and one for negative).
-------
Behaviour #1:
- Add a TAdvGlowButton to a new form.
- Set the Appearance.ColorChecked, Appearance.ColorCheckedTo, Appearance.ColorMirrorChecked and Appearance.ColorMirrorCheckedTo to clGreen
- Set the Appearance.ColorDown, Appearance.ColorDownTo, Appearance.ColorMirrorDown and Appearance.ColorMirrorDownTo to clOlive
- Set the Appearance.TextColorChecked and Appearance.TextColorDown to clCream
- Set the Style to bsCheck
- Run the application
By clicking the button and moving the mouse rapidly outside of the button, sometimes the colour of the button will be clOlive with a clBlack text.
This behaviour is more easily do-able if you place multiple button and try to check/uncheck them rapidly.
The Down state will be "False" when this happen.
Hovering over it will correct the appearance.
(This one seems like some kind of race condition... It's not doing it on 100% of the click-and-move, but it does from time to time)
-------
Behaviour #2:
- Add a TAdvGlowButton to a new form.
- Set the Appearance.ColorChecked, Appearance.ColorCheckedTo, Appearance.ColorMirrorChecked and Appearance.ColorMirrorCheckedTo to clGreen
- Set the Appearance.ColorDown, Appearance.ColorDownTo, Appearance.ColorMirrorDown and Appearance.ColorMirrorDownTo to clOlive
- Set the Appearance.TextColorChecked and Appearance.TextColorDown to clCream
- Set the Style to bsCheck
- Set the GroupIndex to 1
- Run the application
When you click the button, it will not conserve the "Down" state. I don't know if this is the intended behaviour.
-------
Behaviour #3:
- Add a TAdvGlowButton to a new form.
- Set the Appearance.ColorChecked, Appearance.ColorCheckedTo, Appearance.ColorMirrorChecked and Appearance.ColorMirrorCheckedTo to clGreen
- Set the Appearance.ColorDown, Appearance.ColorDownTo, Appearance.ColorMirrorDown and Appearance.ColorMirrorDownTo to clOlive
- Set the Appearance.TextColorChecked and Appearance.TextColorDown to clCream
- Set the Style to bsButton
- Set the AllowAllUp to True
- Set the GroupIndex to 2
- Run the application
By clicking the button, the background will turn clGreen, but the text will stay clBlack and not clCream like I would have expected.
By setting the font color to clCream, it will have the correct color when down, but will not be readable on the grey button when up.
-------
Which of these bahaviours are normal?
How can I have a group of button acting as cancellable radio-button where the text is dark-on-clear when up and clear-on-dark when down?
I normally use the #1 setup and manually up the other buttons with OnClick, but that is quite cumbersome and the behaviour #1 make it not completely appealing.
Thanks for your support!