For example, I have a TreeGrid and I have added a ContextMenu to the TreeGrid. Now I want to draw the ContextMenu only when the user right-click a Leaf Node. My idea is to detect when the ContextMenu is about to be drawn and check if the right-clicked node is a Leaf node:
If the node is a leaf, leave the default behavior
If the node is NOT a leaf, cancel the draw of the ContextMenu
But what event handles the drawing of a component?
If the node is a leaf, leave the default behavior
If the node is NOT a leaf, cancel the draw of the ContextMenu
But what event handles the drawing of a component?