LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

PostDeferredCall with Tree Menu

Hi,
 
Info: Windows XP and CVI 8.
 
I am using NewCtrlMenuItem to edit the menu options depending on the Tree item the user clicks.
 
When the user performs a right click event I setup a postdeferred callback to make sure I get the correct tree item.  In the callback I modify the menu according to the tree item selected.
 
It appears that the CVI tree control menu pops up before the postdeferred callback is executed. 
 
Is there anyway to delay the menu from being displayed until after the postdeferred callback has been executed?
 
Thanks,
Garth
0 Kudos
Message 1 of 3
(3,337 Views)
You don't have to use the deferred callback. Set up the menu in the RIGHT_CLICK_EVENT based on the index you get from GetIndexFromPoint. When the menu appears, the correct item will be active. Also, you have to look for the menu key. See the attached example.
 
Hope this helps,
 
- jared
0 Kudos
Message 2 of 3
(3,222 Views)
Thanks Jared it did the trick.
0 Kudos
Message 3 of 3
(3,200 Views)