Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread TColorButton EWB 2.05
Tue, Sep 13 2016 7:18 AMPermanent Link

Walter Matte

Tactical Business Corporation

Please feel free to extend and repost here.

Walter



Attachments: TColorButton.zip
Mon, Dec 26 2016 3:14 PMPermanent Link

Uli Becker

Hi Walter,

thanks for sharing this.

I tried to enhance the component by adding

FillNormalFontColor
FillHotFontColor

properties in order to set the Font.Color as well.

I tried this code:

procedure TColorButton.UpdateInterfaceState;
begin
   inherited UpdateInterfaceState;
   if InterfaceState = HOT_STATE_NAME then
   begin
      Element.Background.Fill.Color := fFillHotColor;
      Element.Font.Color := fFillHotFontColor;
   end else if InterfaceState = NORMAL_STATE_NAME then
  ...
end;

But that doesn't have any effect. I guess "Element" is the root element
of the interface. How can I change the font color?

Thanks Uli
Fri, Dec 30 2016 7:37 AMPermanent Link

Walter Matte

Tactical Business Corporation

Uli:

 Self.Font.Color

Attached works but needs improvement.  If you set Normal Color via Font property it does not update the fFontNormalColor - need to add the override of setFontColor.


Walter



Attachments: WebColorBtnFont.zip
Fri, Dec 30 2016 8:37 AMPermanent Link

Uli Becker

> Attached works but needs improvement.  If you set Normal Color via Font property it does not update the fFontNormalColor - need to add the override of setFontColor.

Quite easy Smile

Thanks Walter
Image