FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Fore and background coloring of tree nodes ?

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
nicesai



Joined: 05 Dec 2006
Posts: 4

PostPosted: Tue Dec 05, 2006 4:33 pm    Post subject: Fore and background coloring of tree nodes ? Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Wed Dec 06, 2006 6:20 am    Post subject: Re: Fore and background coloring of tree nodes ? Reply with quote

Fixed in today's snapshot. Thanks for letting me know about this.
- Chris
Back to top
View user's profile Send private message
nicesai



Joined: 05 Dec 2006
Posts: 4

PostPosted: Wed Dec 06, 2006 10:42 am    Post subject: Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Thu Dec 07, 2006 5:21 am    Post subject: Reply with quote

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
View user's profile Send private message
nicesai



Joined: 05 Dec 2006
Posts: 4

PostPosted: Thu Dec 07, 2006 1:29 pm    Post subject: Reply with quote

Thanks very much. I successfully used DFL in my project.
Sai
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Dec 08, 2006 7:44 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group