09-23-2009 01:18 AM
Hi
I need someones help to understand and help solve this problem.
I got a tree on the main top level panel, the tree and the panel have a Right Click Event.
The event then run a menupopup and the both menus are loaded on the main panel.
The problem is when i right click on the tree it runs the menupopup but the right click event is been sent to the panel as well which then runs the other menupopup.
Can you explain to me why this is happening and if there is a way to swallow the event been passed to the panel ?
Solved! Go to Solution.
09-23-2009 01:54 AM - edited 09-23-2009 01:55 AM
This is the expected behaviour while responding to callbacks. As can be seen in the online help,
When users click with the right mouse button anywhere or a panel, an EVENT_RIGHT_CLICK event occurs, and is sent to the callback function associated with the panel, as well as to the callback function associated with the control over which the mouse click took place.
The order in which the events are received from various UI objects is the following (online help, topic "Precedence of callback functions"):
To swallow a UI event simply return a non-zero value from the callback (in your case the control callback so that the event is not passed to the panel callback).
09-23-2009 02:03 AM
Swallowing the event worked. Thanks alot.
09-23-2009 02:04 AM