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 » Mon Mar 12, 2018 10:36 pm

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: 2477
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Area.ContextMenu (none)

Post by airsoftsoftwair » Sat Mar 17, 2018 12:43 am

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 » Sat Mar 17, 2018 1:10 am

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: 2477
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Area.ContextMenu (none)

Post by airsoftsoftwair » Sat Mar 17, 2018 4:56 pm

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

Post Reply