emin Posted February 15, 2022 Share Posted February 15, 2022 I want to change the icon colors when UniTreemenu is in micro mode, and use the old color again when out of micro mode. I tried the below codes but both didn't work Quote UniTreeMenu1.JSInterface.JSCode(#1'.getEl().select(".x-treelist-item-icon").setStyle("Color", "#43A047");'); UniTreeMenu1.JSInterface.JSCode(#1'.getEl().select(".x-treelist-item-icon").each(function(el){el.setStyle("Color", "#43A047")});'); Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 15, 2022 Share Posted February 15, 2022 Hello, Which build are you using? 1 hour ago, emin said: UniTreeMenu1.JSInterface.JSCode(#1'.getEl().select(".x-treelist-item-icon").setStyle("Color", "#43A047");'); UniTreeMenu1.JSInterface.JSCode(#1'.getEl().select(".x-treelist-item-icon").each(function(el){el.setStyle("Color", "#43A047")});'); Where are you using these codes? Quote Link to comment Share on other sites More sharing options...
emin Posted February 15, 2022 Author Share Posted February 15, 2022 I use a button to change the menu to micro mode. I added it to its click event Quote procedure TMainForm.UniButton1Click(Sender: TObject); begin if UniTreeMenu1.Micro = true then xxxx else yyyy; end; Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 15, 2022 Share Posted February 15, 2022 Just now, emin said: I use a button to change the menu to micro mode. I added it to its click event Do you have a simple testcase to check? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 15, 2022 Share Posted February 15, 2022 Did it work before? Quote Link to comment Share on other sites More sharing options...
emin Posted February 15, 2022 Author Share Posted February 15, 2022 When such a request came from the customers for the first time, I found the codes that I tried by searching the forum. I've never tried before. Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 15, 2022 Share Posted February 15, 2022 Okay. What icons are you using? Quote Link to comment Share on other sites More sharing options...
emin Posted February 15, 2022 Author Share Posted February 15, 2022 font awesome Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 15, 2022 Share Posted February 15, 2022 OK. I will check. Quote Link to comment Share on other sites More sharing options...
emin Posted February 15, 2022 Author Share Posted February 15, 2022 Thank you Quote Link to comment Share on other sites More sharing options...
emin Posted February 24, 2022 Author Share Posted February 24, 2022 Is there any progress Quote Link to comment Share on other sites More sharing options...
Sherzod Posted February 24, 2022 Share Posted February 24, 2022 3 hours ago, emin said: Is there any progress I'm sorry I forgot. I was able to do not for micro mode by adding and removing css classes. 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.