Page 1 of 1

Area.ContextMenu (none)

Posted: Mon Mar 12, 2018 9:36 pm
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"!

Re: Area.ContextMenu (none)

Posted: Fri Mar 16, 2018 11:43 pm
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.

Re: Area.ContextMenu (none)

Posted: Sat Mar 17, 2018 12:10 am
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?

Re: Area.ContextMenu (none)

Posted: Sat Mar 17, 2018 3:56 pm
by airsoftsoftwair
I don't know if that's possible with MUI. Ask tboeckel for clarification, he should know.