mikromundo Posted February 19, 2020 Share Posted February 19, 2020 Hi, I take this CSS: .x-btn .x-btn-inner { color: gray !important; } .x-btn-over .x-btn-inner { color: black !important; } It changes all buttons. How can I apply only to a specific button? I tried a few ways and failed. I couldn't identify what I'm doing wrong. Quote Link to comment Share on other sites More sharing options...
Hayri ASLAN Posted February 19, 2020 Share Posted February 19, 2020 Hi, Can you try this? procedure TMainForm.UniFormCreate(Sender: TObject); begin with UniBitBtn1, JSInterface do begin JSCallGlobal('Ext.util.CSS.createStyleSheet', ['#' + JSId +'.x-btn .x-btn-inner { color: gray !important;}', JSName + '_css1']); JSCallGlobal('Ext.util.CSS.createStyleSheet', ['#' + JSId +'.x-btn-over .x-btn-inner { color: black !important;}', JSName + '_css2']); end; end; And don't forget to destroy them. procedure TMainForm.UniFormDestroy(Sender: TObject); begin with UniBitBtn1, JSInterface do begin JSCallGlobal( 'Ext.util.CSS.removeStyleSheet',[JSName + '_css1']); JSCallGlobal( 'Ext.util.CSS.removeStyleSheet',[JSName + '_css2']); end; end; Quote Link to comment Share on other sites More sharing options...
mikromundo Posted February 19, 2020 Author Share Posted February 19, 2020 Thanks...I will try Quote Link to comment Share on other sites More sharing options...
mikromundo Posted February 19, 2020 Author Share Posted February 19, 2020 Perfect @Hayri ASLAN Thanks so much !!! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.