I've just moved from RB5 to 200x and am trying to debug some behaviour under Windows. I have a Canvas with several ContextualMenu controls, different ones being activated depending on the context when you right-click. This works fine still on OS/X.

Contextual menus on a Canvas aren't triggering the MouseUp event, despite returning true from the MouseDown.

From reading other forum posts, it seems that the now approved way is to use the ConstructContextualMenu event handler.

I can't find any mention in the LanguageReference or ReadMe saying that MouseDown handling is only for non-contextual clicks but that seems to be the current Windows behaviour. I'm not sure if that is a documentation bug or a framework bug.

I also fail to understand how RectControl.ContextualMenuAction works:
"Use this in conjunction with ConstructContextualMenu if you have not specified the Action event or the Menu Handler for the items on the contextual menu."

How are you supposed to specify the Action event or the Menu Handler when using ConstructContextualMenu? ConstructContextualMenu doesn't allow you to specify a ContextualMenu control - you are passed in a MenuItem to which you append items.

Is the recommended technique to put a big switch statement inside your ConstructContextualMenu and ContextualMenuAction event handlers, rather than having several ContextualMenu controls?

thanks

Andy
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to