Jump to content

Recommended Posts

Posted

Hi,

Can anyone tell me how to;

 

1. Expand all and collapse all nodes in a unidbtreegrid

2. Change selected background color and stop TrackOver

3. Change the default folder icons when showicons is true

 

Thanks

Mark

Posted

Hi,

 

1. Expand all and collapse all nodes in a unidbtreegrid

 

You can use like this:

UniDBTreeGrid1.JSInterface.JSCall('expandAll', []);

UniDBTreeGrid1.JSInterface.JSCall('collapseAll', []);
Posted

Hi,

I swapped the images (folder icons) out in the theme for now, but I'd rather load my own in dynamically without modifying the theme images. Also I'm trying to find what I need to change the selected background color in the sencha reference but am struggling to locate what I need, any help with that would be greatly appreciated.

 

Mark

Posted

Hi,
Also I have noticed that when there is a parent with no child nodes the icon is leaf.png not folder.png which is what I would expect, any ideas about that?
Thanks
Mark

 

post-4824-0-51697400-1495754036_thumb.png

 

 

 

 

  • Administrators
Posted

Hi,

Also I have noticed that when there is a parent with no child nodes the icon is leaf.png not folder.png which is what I would expect, any ideas about that?

Thanks

Mark

 

attachicon.gifunidbtree1.png

 

A parent with no child is no longer a parent, it is a leaf. i.e. a node can be called a parent if it has 1 or more children.

Posted

 

Below methods are already implemented for TreeGrid.

  procedure FullExpand;
  procedure FullCollapse;

 

Yes thanks Farshad. I did overlook those methods.

Posted

A parent with no child is no longer a parent, it is a leaf. i.e. a node can be called a parent if it has 1 or more children.

 

I do get that.

 

I was just thinking of the parent as a "container" and children as "objects" that can be assigned to a container, in that instance a container is still a container even if its empty. Its not a big issue at all.

 

With help, I have all my questions answered now like so;

  UniSession.SetStyle(
    ' .x-tree-view { background-color: ' + uniColor2Web(grouptree1.color) + ';'+
    '}'+
    ' .x-tree-view .x-grid-cell-inner-treecolumn{ background-color: ' + uniColor2Web(grouptree1.color) + ';'+
    '  color: ' + uniColor2Web(grouptree1.Font.Color) +';'+
    '  fontSize:' + uniColor2Web(grouptree1.Font.Size) +';'+
    '  font: ' + grouptree1.Font.ToString(False, False, False, False) +';'+
    '}'+
    ' .x-tree-view .x-grid-cell-selected .x-grid-cell-inner-treecolumn { background-color: #99cc00;'+
    '  color: ' + uniColor2Web(clBlack) +';'+
    '  fontSize:' + uniColor2Web(grouptree1.Font.Size) +';'+
    '  font: ' + grouptree1.Font.ToString(False, False, False, False) +';'+
    '}'+
    ' .x-tree-icon { height: 36px; width: 32px;'+
    '}'+
    '.x-tree-no-lines .x-tree-expander { background-image: url(files/elbow-plus-nl.png);'+
    '}'+
    '.x-tree-no-lines .x-grid-tree-node-expanded .x-tree-expander {background-image: url(files/elbow-minus-nl.png);'+
    '}'+
    '.x-tree-icon-leaf { background-image: url(files/leaf.png);'+
    '}'+
    '.x-tree-icon-parent { background-image: url(files/folder.png);'+
    '}'+
    '.x-grid-tree-node-expanded .x-tree-icon-parent { background-image: url(files/folder-open.png);'+
    '}'+
    '.x-grid-row-selected .x-grid-cell { background-color:#99cc00 !important;'+
    '}'
  );

Thanks again

Mark

  • 3 weeks later...
Posted

Dear friends,

I try to use CSS that Mark posted above but it doesn't work in my case ( I created Frame, set it's parent as MainForm. If UniDBTreeGrid palced on Form all works fine but if it placed on Frame, it doesn't work. What's wrong? 

  • 1 month later...
Posted

Dear friends,

I try to use CSS that Mark posted above but it doesn't work in my case ( I created Frame, set it's parent as MainForm. If UniDBTreeGrid palced on Form all works fine but if it placed on Frame, it doesn't work. What's wrong? 

same problem?

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...