Jump to content

Making the UniTreeMenu1 object change color according to the theme


pro_imaj

Recommended Posts

Hi,

When I add the UniTreeMenu1 object to the form, although Color := clWindow, when I select a theme, its color does not change according to the theme. How can I make the color change according to the theme?
Like all other objects, I want the color to change according to the theme when the theme is selected.

Thank you.

Link to comment
Share on other sites

16 minutes ago, pro_imaj said:

Hi,

When I add the UniTreeMenu1 object to the form, although Color := clWindow, when I select a theme, its color does not change according to the theme. How can I make the color change according to the theme?
Like all other objects, I want the color to change according to the theme when the theme is selected.

Thank you.

The problem occurs when I do it through the example here.
\FMSoft\Framework\uniGUI\Demos\Desktop\Tablet Application

Link to comment
Share on other sites

  MenuTree.ClientEvents.ExtEvents.Values['afterlayout'] := ' function afterlayout(sender, layout, eOpts)'
                                                        + ' {'
                                                        + '    Ext.get("' + MenuTree.JSId + '").setStyle({"background-color":"rgba(0,0,0,0)"});'
                                                        + '    if(!!Ext.get("' + MenuTree.JSId + '").el.dom.children[0].id){'
                                                        + '      var kid = Ext.get("' + MenuTree.JSId + '").el.dom.children[0].id;'
                                                        + '      Ext.get(kid).setStyle({"background-color":"rgba(0,0,0,0)"});'
                                                        +'     };'
                                                        + ' }';

Set the tree menu background to transparent

Link to comment
Share on other sites

4 hours ago, 风吹小机机 said:

  MenuTree.ClientEvents.ExtEvents.Values['afterlayout'] := ' function afterlayout(sender, layout, eOpts)'
                                                        + ' {'
                                                        + '    Ext.get("' + MenuTree.JSId + '").setStyle({"background-color":"rgba(0,0,0,0)"});'
                                                        + '    if(!!Ext.get("' + MenuTree.JSId + '").el.dom.children[0].id){'
                                                        + '      var kid = Ext.get("' + MenuTree.JSId + '").el.dom.children[0].id;'
                                                        + '      Ext.get(kid).setStyle({"background-color":"rgba(0,0,0,0)"});'
                                                        +'     };'
                                                        + ' }';

Set the tree menu background to transparent

Thanks for your suggestion,
This solution creates problems for some template options, they are often grayed out and make text unreadable.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...