Change MenuItems on the fly

Change MenuItems on the fly

Postby reinaldocrespo » Mon Jan 09, 2012 10:16 pm

Hi.

I'd like to change the menu items on menu option n (say 5) via code. Can someone help?

Thank you,


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 974
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Change MenuItems on the fly

Postby Enrico Maria Giordano » Mon Jan 09, 2012 11:11 pm

Try this:

Code: Select all  Expand view
oMenu:aItems[ 5 ]:SetPrompt( "Changed" )


EMG
User avatar
Enrico Maria Giordano
 
Posts: 8419
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Change MenuItems on the fly

Postby reinaldocrespo » Tue Jan 10, 2012 12:54 am

Enrico;

Hi.

How about removing all submenu options from oMenu:aItems[5] and then adding 3 new submenu items with actions to oMenu:aItems[ 5 ]?

Thank you,


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 974
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL

Re: Change MenuItems on the fly

Postby Enrico Maria Giordano » Tue Jan 10, 2012 10:08 am

Please look inside mru.prg.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8419
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: Change MenuItems on the fly

Postby reinaldocrespo » Tue Jan 10, 2012 9:15 pm

Yes!

Thank you Enrico.


Reinaldo.
User avatar
reinaldocrespo
 
Posts: 974
Joined: Thu Nov 17, 2005 5:49 pm
Location: Fort Lauderdale, FL


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 147 guests