Home › Forums › Konopka Signature VCL Controls (formerly Raize Components) › TRzToolButton
- This topic has 3 replies, 2 voices, and was last updated 2018-11-25 at 1:51 am by
Ray Konopka.
-
AuthorPosts
-
-
November 14, 2018 at 2:59 pm #496
Hello,
How can’I change caption font color when mouse is on button.
Paul.
-
November 14, 2018 at 5:07 pm #497
Hi,
There is no built-in properties to allow this, but you could write event handlers for the OnMouseEnter and OnMouseLeave events and do something like this:
procedure TForm4.RzToolButton1MouseEnter(Sender: TObject); begin RzToolButton1.Font.Color := clRed; end; procedure TForm4.RzToolButton1MouseLeave(Sender: TObject); begin RzToolButton1.Font.Color := clGreen; end;Ray
-
November 15, 2018 at 2:19 am #498
It’s not working with my code.
Transparent := True;
VisualStyle := vsGradient;
GradientColorStyle := gcsCustom;
SelectionColorStart := StyleServices.GetStyleColor(scButtonFocused);
SelectionColorStop := StyleServices.GetStyleColor(scButtonFocused);
SelectionFrameColor := StyleServices.GetStyleColor(scButtonFocused);I need to change font color to white.
-
November 25, 2018 at 1:51 am #560
I apologize for the delay in responding. Been rather busy getting new versions of our Raize Software products released.
Back to your question. From the code you provided, it looks like you are using VCL Styles. Is that correct? Then in that case, the technique I provided above will not work. The reason is because the button is designed to pickup the custom style when active. The default behavior of the TRzToolButton is to pickup the background and font colors from the style. I’m not quite sure what appearance you are trying to achieve since you are essentially getting rid of the gradient and hiding the button frame. What style are you using? and what appearance are you trying to achieve?
Ray
-
-
AuthorPosts
- You must be logged in to reply to this topic.