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.
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.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
>> 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 +
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.
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.
ASKER
Thanks everyone - I'll take a look! This is a hugely great group of answers.
ASKER
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
(and I guess you could use it in all versions).
>> void setToggleClickCount(int)
Looks like a good option.
>> void setToggleClickCount(int)
Looks like a good option.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.
:-)
You could of course, catch the click event on the node and then call expand () to expand it.