MenuStrips

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

MenuStrips

Post by djrikki »

Hi,

Come across a very awkward limitation, although you give examples of the Cut, Copy and Paste menustrips in the documentation it appears that it is not possible to reference the same contextmenu twice!

Code: Select all

Menustrip object 'clipboard' has already been used!
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: MenuStrips

Post by djrikki »

How do I retrieve the ID of the gadget underneath the context menu that I have clicked on? (assuming the above is false and that I can share the same menustrip)
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: MenuStrips

Post by djrikki »

In fact... even with an ID how the hell do I find out what text the user has highlighted out of a string field? (because it might not be the full contents)
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5848
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: MenuStrips

Post by airsoftsoftwair »

It is possible to use the same context menu twice for multiple MUI objects but only within the same window! But you must not use a window's menustrip as a context menu or vice versa.
Check Area.ContextMenuTrigger to find out about the gadget underneath the context menu.
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: MenuStrips

Post by djrikki »

Nope, I just cannot get this to work. How do I use ContextMenuTrigger? In the examples you also have msg.triggervalue no mention in the documentation however?

Please can you can a short example in XML and HW.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5848
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: MenuStrips

Post by airsoftsoftwair »

Suppose you want to have a context menu on a button, it works like that:

Code: Select all

<button contextmenu="id_of_context_menu" notify="contextmenutrigger" id="button_1">Test</button>
Whenever the user selects an item from the context menu, your event callback will be called with msg.ID set to the ID of the button ("button_1") and msg.TriggerValue set to the ID of the menu item that has been selected.

BIG PROBLEM: I've just realized that there's a bug in MUI Royale 1.0 which prevents msg.TriggerValue from getting the ID of the selected menu item. I'll fix this for the next version.
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: MenuStrips

Post by djrikki »

Yeah that is a big problem! Am moving on to Clipboard functionality now. ^.^ I look forward to your next release.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
djrikki
Posts: 682
Joined: Wed Apr 06, 2011 12:26 am

Re: MenuStrips

Post by djrikki »

Again, I realise its a MUI limitation that I cannot use a menustrip between windows... but Jack now has 31 windows! Thats a lot of unnecessary duplication. :lol: Not all of them have String gadgets though.
Evolve - Rapid GUI Development tool for MUI Royale and RapaGUI
http://myevolve.wordpress.com
User avatar
airsoftsoftwair
Posts: 5848
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: MenuStrips

Post by airsoftsoftwair »

You could use Application.Menustrip to set a global menu strip for all windows that do not define their own menustrip. This way you should be to reduce menu strip overhead a little.
Post Reply