Area.ContextMenu (none)

Discuss GUI programming with the MUI Royale plugin here
Post Reply
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Area.ContextMenu (none)

Post by djrikki »

In MUI Royale 1.0 this attribute could only be used at initialization stage. Starting with MUI Royale 1.1 it has an applicability of "IS" which means that you can also change context menus at runtime. To remove a context menu completely, pass the special string "(none)" to this attribute.
Trying to set contextmenu="(none)" in the xml file during 'I' stage doesn't work.

E.g. applying it a <listview> Cannot find MUI object 'none"!
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Area.ContextMenu (none)

Post by airsoftsoftwair »

Why would you want to specify "(none)" at initialization time? If you don't want a context menu, just leave out the context menu attribute in the XML entirely.
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: Area.ContextMenu (none)

Post by djrikki »

Specifies a context sensitive popup menu for the current object. For MUI, popup menus are nothing else but standard intuition menus, so you must specify the id of a MUI menustrip object here.
Whenever the user hits the RMB and the mouse is above the parent object, MUI will present the popup menu instead of the windows menu.

Please note that menustrips which are used as context menus must not contain more than one <menu> tree.

In MUI Royale 1.0 this attribute could only be used at initialization stage. Starting with MUI Royale 1.1 it has an applicability of "IS" which means that you can also change context menus at runtime. To remove a context menu completely, pass the special string "(none)" to this attribute.

See Menustrip class for an example.
------

I see perhaps I should make it clearer.

"To remove a context menu completely, pass the special string "(none)" to this attribute. At the moment whenever I RMB over a gadget that doesn't have a contextmenu I instead get the Screen contextmenu if there is one defined, I don't always want that appearing wherever I hover my mouse. I don't know if that can be changed or whether that is OS behaviour?
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Area.ContextMenu (none)

Post by airsoftsoftwair »

I don't know if that's possible with MUI. Ask tboeckel for clarification, he should know.
Post Reply