Link to home
Start Free TrialLog in
Avatar of cornell256
cornell256

asked on

Example of tree where clicking on node opens up the menu

I am having a discussion with someone about the way trees behave.  I thought I have seen common behavior where given a tree with items in several nodes, and starting with the tree collapsed, you could click on the label of the node to open up the menu - as if you were clicking on the + to expand.  This has the advantage that you don't need the fine motor skills to click on the tiny +.

I went to look for examples and don't see any.  Has anyone seen this work this way and can you give me examples from the Web? I would need to find code for the control that worked this way, as well.
Avatar of Mayank S
Mayank S
Flag of India image

>> you could click on the label of the node to open up the menu

You could of course, catch the click event on the node and then call expand () to expand it.
ASKER CERTIFIED SOLUTION
Avatar of hoomanv
hoomanv
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>> you don need to exactly click on the +, clicking on the node is sufficient

You need to double-click on the node, or click on +
aha :-)
there is a method that does this

void setToggleClickCount(int)
int getToggleClickCount()       Set or get the number of mouse clicks before a node will expand or close. The default is two. Introduced in 1.3.
Avatar of cornell256
cornell256

ASKER

Thanks everyone - I'll take a look!  This is a hugely great group of answers.
I'm sure there is enough here to close this question.  I'll leave up for awhile in case I have any issues related to these answers.  Thanks again everyone!
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
(and I guess you could use it in all versions).

>> void setToggleClickCount(int)

Looks like a good option.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi, Everyone - thanks for all the help.  These are all helpful posts, I'll increase points and do the best I can to split them three ways.