Jump to content

MarkLince

Recommended Posts

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

Link to comment
Share on other sites

  • Administrators

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.

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 3 weeks later...

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? 

Link to comment
Share on other sites

  • 1 month later...

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