|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Offer Har
|
Apr 9, 2008 - 7:58 AM
|
I override OnTreeGridToggleItemExpandedState , for implementing my virtual tree. According to the help file this function is: "Called when a tree grid item is expanded or collapsed." Hoever, if you set the focus to a node, and press the right arrow, which expands this node, the fucntion is not called. Please fix....
|
|
Offer Har
|
Apr 10, 2008 - 11:04 AM
|
This is from the help file of 2.82: ItemExpand: Expands or collapses the list of child items, if any, associated with the specified parent item. OnTreeGridToggleItemExpandedState: Called when a tree grid item is expanded or collapsed. So, if I understand the help, the second function is an event firing, whereas the first one is a command to expand a node. It is very unclear to me why the OnXXX is fired when I click with the mouse on a node, and not when I use the keyboeard - please explain to me what is the difference, and how your solution can solve the problem. All user method of expanding and collapsing a node should end in the same OnXXX function.
|
|
Technical Support
|
Apr 10, 2008 - 10:54 AM
|
The name of the OnTreeGridToggleItemExpandedState() method contains the word Toggle. This means the method is invoked for toggling the expanded state rather than forcibly expanding or collapsing a node regardless of its state. Please override the CExtTreeGridWnd::ItemExpand() method instead.
|
|
Offer Har
|
Apr 11, 2008 - 2:26 PM
|
Dear Support, Even though I think there is some confusion in the definitions in the help file, overrding ItemExand does catch all cases that a node is exanded or collapsed, so I don’t need OnTreeGridToggleItemExpandedStat at all. Can you please give me an example when OnTreeGridToggleItemExpandedState is used? Thanks.
|
|
Technical Support
|
Apr 16, 2008 - 4:58 AM
|
In fact, the OnTreeGridToggleItemExpandedState() method is currently used by the CExtTreeGridWnd class internally only and only in the case when a tree row should toggle its expanded state. We think we should update the documentation or improve this method. This is not the only duplicated virtual method in Prof-UIS and we think the several ways of catching similar events is not a problem. You simply catch different particular events on the different layers.
|
|
Offer Har
|
Apr 10, 2008 - 11:05 AM
|
This is from the help file of 2.82: ItemExpand: Expands or collapses the list of child items, if any, associated with the specified parent item. OnTreeGridToggleItemExpandedState: Called when a tree grid item is expanded or collapsed. So, if I understand the help, the second function is an event firing, whereas the first one is a command to expand a node. It is very unclear to me why the OnXXX is fired when I click with the mouse on a node, and not when I use the keyboeard - please explain to me what is the difference, and how your solution can solve the problem. All user method of expanding and collapsing a node should end in the same OnXXX function.
|
|