FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Change MenuItems on the fly
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Change MenuItems on the fly
Posted: 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.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Change MenuItems on the fly
Posted: Mon Jan 09, 2012 11:11 PM
Try this:

Code (fw): Select all Collapse
oMenu:aItems[ 5 ]:SetPrompt( "Changed" )


EMG
Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: Change MenuItems on the fly
Posted: 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.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Change MenuItems on the fly
Posted: Tue Jan 10, 2012 10:08 AM

Please look inside mru.prg.

EMG

Posts: 990
Joined: Thu Nov 17, 2005 05:49 PM
Re: Change MenuItems on the fly
Posted: Tue Jan 10, 2012 09:15 PM

Yes!

Thank you Enrico.

Reinaldo.

Continue the discussion