Jump to content

BadgeText color unimButton


hph

Recommended Posts

On 2/25/2019 at 9:00 PM, hph said:

how can I change the color (or other badge properties) in runtime?

Hi,

You can try to use this approach:

1. Uses:

Uses ... , uniGUIJSUtils;

2. For example:

procedure TMainmForm.UnimButton2Click(Sender: TObject);
begin
  with UnimButton1.JSInterface do
  begin
    JSCall('badgeElement.setStyle', ['color', uniColor2Web(clWhite)]);
    JSCall('badgeElement.setStyle', ['background-color', uniColor2Web(clGreen)]);
  end;
end;

 

Link to comment
Share on other sites

×
×
  • Create New...