Jump to content
uniGUI Discussion Forums
lucas.dolberth

ImageIndex TreeView

Recommended Posts

We have an application that uses the mainModule theme "uni_mac_yosemite", I am developing a form where I need to change the images of the items of a UNITreeView, but using this theme it was not possible to set the imageindex, since using the default theme works normally, however I can not change the theme because the whole application already uses this format.

 

 

Has anyone had this problem and could it help me, whether it has change directly in the source with some property or configuration or if just adding the treatment via JS?

Share this post


Link to post
Share on other sites

uni-1.0.0.1410

 

UniTreeView -> ClientEvents -> ExtEvents -> Ext.data.TreeStore[store] -> function store.update:

function store.update(sender, record, operation, modifiedFieldNames, eOpts)
{
    var tree=this.treePanel;
    Ext.defer(function(){
        tree.el.select('.x-tree-icon').elements.forEach(function(el){
            var _s=el.style['background-image'];
            if (_s!=''){
                el.setAttribute('style', 'background-image:'+_s+' !important')
            }
        });
        tree.el.select('.x-tree-icon-parent').elements.forEach(function(el){
            var _s=el.style['background-image'];
            if (_s!=''){
                el.setAttribute('style', 'background-image:'+_s+' !important')
            }
        });
    }, 25);
}

Share this post


Link to post
Share on other sites

 

UniTreeView -> ClientEvents -> ExtEvents -> Ext.data.TreeStore[store] -> function store.update:

function store.update(sender, record, operation, modifiedFieldNames, eOpts)
{
    var tree=this.treePanel;
    Ext.defer(function(){
        tree.el.select('.x-tree-icon').elements.forEach(function(el){
            var _s=el.style['background-image'];
            if (_s!=''){
                el.setAttribute('style', 'background-image:'+_s+' !important')
            }
        });
        tree.el.select('.x-tree-icon-parent').elements.forEach(function(el){
            var _s=el.style['background-image'];
            if (_s!=''){
                el.setAttribute('style', 'background-image:'+_s+' !important')
            }
        });
    }, 25);
}

 

thank you so much :)

Share this post


Link to post
Share on other sites

I had the same problem with TUniMenuItem.
I am trying to change the image (ImageIndex) of a TUniMenuItem from a TUniPopupMenu but in the TUniMenuButton does not refresh the image ... it is only the default defined ... I want to show the option that was clicked ...
how would that be?

 

I'm using Version 1.10.0.1466

Share this post


Link to post
Share on other sites
4 hours ago, brunomf01 said:

I'm using Version 1.10.0.1466

 Which edition are you using? 

Share this post


Link to post
Share on other sites
On 3/22/2019 at 12:11 AM, Sherzod said:

 Which edition are you using?

FMSoft_uniGUI_Complete_Professional_1.10.0.1466

 

FMSoft_uniGUI_Complete_runtime_1.10.0.1466

FMSoft_uniGUI_Documentation_1.10.0.1466

FMSoft_uniGUI_Theme_Pack_1.10.0.1466

Share this post


Link to post
Share on other sites

Hello, 

Please adjust your forum email address first:

And can you upgrade to the latest version and build? 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×