Web forum is in read-only mode. Login as active registered customer for write access
  Forum Search   New Posts New Posts

TAdvGlowButton behaviours when acting as checkbox

 Post Reply Post Reply
Author
Raphael Sylvain View Drop Down
New Member
New Member
Avatar

Joined: 20 Jun 2019
Posts: 9
Post Options Post Options   Quote Raphael Sylvain Quote  Post ReplyReply Direct Link To This Post Topic: TAdvGlowButton behaviours when acting as checkbox
    Posted: 14 Nov 2019 at 3:20pm
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!
Back to Top
Bruno Fierens View Drop Down
TMS Support
TMS Support
Avatar

Joined: 11 May 2010
Posts: 8326
Post Options Post Options   Quote Bruno Fierens Quote  Post ReplyReply Direct Link To This Post Posted: 18 Nov 2019 at 4:53pm
1. I have tested this for quite an extensive amount of time but could not reproduce this. Do you have more exact details?
2. A radiobutton behavior is not supposed to be combined with a checkbox button behavior
3. We could reproduce this and will investigate
Back to Top
Raphael Sylvain View Drop Down
New Member
New Member
Avatar

Joined: 20 Jun 2019
Posts: 9
Post Options Post Options   Quote Raphael Sylvain Quote  Post ReplyReply Direct Link To This Post Posted: 18 Nov 2019 at 8:21pm
Hi Bruno,

I've send an email to the "info" address.

It has an attachement which contains a small test project and an animated GIF showing the behaviour #1.

Thanks for the answer!
Back to Top
Raphael Sylvain View Drop Down
New Member
New Member
Avatar

Joined: 20 Jun 2019
Posts: 9
Post Options Post Options   Quote Raphael Sylvain Quote  Post ReplyReply Direct Link To This Post Posted: 21 Nov 2019 at 4:30pm
A quick note to say that behaviour #1 should be fixed in the next update according to email-support.

Originally posted by Email

Dear Mr. Sylvain

 

Thank you for the test project, I was able to reproduce the issue.
A fix will be applied for this in the next update.

 

Kind regards,

Gjalt Vanhouwaert


Thanks!
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down