Hi,
I use TAdvGlowButton with bsCheck style in a TAdvToolbar and I encounter some weird behaviours.
- When I hover a upped button it is highlighted but when it is a downed button it is not highlighted.
- When I mouse down a upped button it colors it as downed (that is fine) but when I release mouse outside the button, it stays colored as downed instead of normal and the property Down is False.
If I repeat the operation on the same button it restores the right color (normal).
Thanks.
- There is currently no hover effect on a check style button in down state2) I cannot reproduce this. Do you use the latest version of the component? v2.4.7.6.
interface
uses
System.Classes, Vcl.Controls, Vcl.Forms, AdvGlowButton, System.Actions, Vcl.ActnList, Vcl.Menus, AdvMenus;
type
TForm1 = class(TForm)
AdvGlowButton1: TAdvGlowButton;
ActionList1: TActionList;
Action1: TAction;
AdvMainMenu1: TAdvMainMenu;
File1: TMenuItem;
Action11: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure Action1Execute(Sender: TObject);
private
public
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Action1Execute(Sender: TObject);
begin
Action1.Checked := not Action1.Checked;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
Action1.Checked := True;
end;
end.
-------------------------------------------------------------------------------------------------
Menu = AdvMainMenu1
OnCreate = FormCreate
object AdvGlowButton1: TAdvGlowButton
Left = 9
Top = 2
Width = 23
Height = 22
Action = Action1
ShowCaption = False
Style = bsCheck
end
object ActionList1: TActionList
object Action1: TAction
Caption = 'Action1'
OnExecute = Action1Execute
end
end
object AdvMainMenu1: TAdvMainMenu
object File1: TMenuItem
Caption = 'File'
object Action11: TMenuItem
Action = Action1
end
end
end
end
I also noticed that for glow button appearance some properties are inverted.
FAdvGlowButtonAppearance.ColorMirror := HtmlToColor('#C0D4ED'); // bottom
FAdvGlowButtonAppearance.ColorMirrorTo := HtmlToColor('#9CC0ED'); // middle
FAdvGlowButtonAppearance.ColorMirrorChecked := HtmlToColor('#FDEB9F'); // bottom
FAdvGlowButtonAppearance.ColorMirrorCheckedTo := HtmlToColor('#FEB456'); // middle
FAdvGlowButtonAppearance.ColorMirrorDisabled := HtmlToColor('#D0D0D0'); // middle // ???
FAdvGlowButtonAppearance.ColorMirrorDisabledTo := HtmlToColor('#F2F2F2'); // bottom // ??? inverted Color and ColorTo for disable ???
FAdvGlowButtonAppearance.ColorMirrorDown := HtmlToColor('#FD9F4C'); // bottom
FAdvGlowButtonAppearance.ColorMirrorDownTo := HtmlToColor('#F1720E'); // middle
FAdvGlowButtonAppearance.ColorMirrorHot := HtmlToColor('#FFE9A4'); // bottom
FAdvGlowButtonAppearance.ColorMirrorHotTo := HtmlToColor('#FFDA59'); // middle
Was my explanation clear enough?
Did you reproduce the issue ?
Either details are missing or I cannot reproduce this.
I tried your zip and I can reproduce the issue following these steps:
- Launch the application
- Press left mouse button on the glow button (keep mouse button down)
- Move out of the button
- Release the mouse button
- Hover the glow button with the mouse
- The glow button is now visible as unchecked and the action is checked in menu
We traced & solved this. The next update will address this.
Thanks guys,
It's really nice to see your responsiveness.