View previous topic :: View next topic |
Author |
Message |
nicesai
Joined: 05 Dec 2006 Posts: 4
|
Posted: Tue Dec 05, 2006 4:33 pm Post subject: Fore and background coloring of tree nodes ? |
|
|
I tried to change the fore and background colors of tree control but the individual nodes are not changing their color. Whats the way to do it ?
Thanks in advance
Sai |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Wed Dec 06, 2006 6:20 am Post subject: Re: Fore and background coloring of tree nodes ? |
|
|
Fixed in today's snapshot. Thanks for letting me know about this.
- Chris |
|
Back to top |
|
|
nicesai
Joined: 05 Dec 2006 Posts: 4
|
Posted: Wed Dec 06, 2006 10:42 am Post subject: |
|
|
Thanks a lot for fixing this, couple of things left are:
1. When the font size of the tree nodes change, the node "height" doesn't change to fit the larger text.
2. Is it possible to use the new background color in the small squares with plus sign in them located on left side of the expandable nodes in the tree ? that would be awesome.
3. Can you please add double-click event to the tree-leaves, I couldn't find them in the source.
Thank you
Sai |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Thu Dec 07, 2006 5:21 am Post subject: |
|
|
nicesai wrote: | 1. When the font size of the tree nodes change, the node "height" doesn't change to fit the larger text.
2. Is it possible to use the new background color in the small squares with plus sign in them located on left side of the expandable nodes in the tree ? that would be awesome. | I'll look into these soon.
Quote: | 3. Can you please add double-click event to the tree-leaves, I couldn't find them in the source. | The TreeView control has doubleClick event.
Code: | tree.doubleClick ~= &tree_doubleClick;
...
private void tree_doubleClick(Object sender, EventArgs ea)
{
if(tree.selectedNode)
msgBox(this, tree.selectedNode.toString(), "Selected:");
} |
|
|
Back to top |
|
|
nicesai
Joined: 05 Dec 2006 Posts: 4
|
Posted: Thu Dec 07, 2006 1:29 pm Post subject: |
|
|
Thanks very much. I successfully used DFL in my project.
Sai |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Dec 08, 2006 7:44 am Post subject: |
|
|
nicesai wrote: | 1. When the font size of the tree nodes change, the node "height" doesn't change to fit the larger text. |
I was unable to fix this. The Windows API documentation has a note about this and it's done for "backwards compatibility", and it has a workaround, but it still doesn't seem to work. It might work if you have XP styles enabled (I don't). Here's the MSDN link if anyone's interested in looking into it.
Quote: | 2. Is it possible to use the new background color in the small squares with plus sign in them located on left side of the expandable nodes in the tree ? that would be awesome. |
I added a workaround for this in today's snapshot. |
|
Back to top |
|
|
|