hph Posted February 25, 2019 Share Posted February 25, 2019 Hi How can i change the badgetext background color in a unimButton? Link to comment Share on other sites More sharing options...
Sherzod Posted February 25, 2019 Share Posted February 25, 2019 Hi, One possible solution I think 1. CustomCSS: .custom-btn .x-badge-el { color: green; background-image: none; background-color: lime; } 2. beforeInit: function beforeInit(sender, config) { config.cls="custom-btn"; } Link to comment Share on other sites More sharing options...
hph Posted February 25, 2019 Author Share Posted February 25, 2019 Hi Sherzod Very thank you, it works fine! But, how can I change the color (or other badge properties) in runtime? best regards Link to comment Share on other sites More sharing options...
Sherzod Posted February 26, 2019 Share Posted February 26, 2019 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 More sharing options...
hph Posted February 27, 2019 Author Share Posted February 27, 2019 Hi Sherzod Thank you very much, it works perfectly!! best regards Link to comment Share on other sites More sharing options...
Recommended Posts