Of course, if you want to have the effect of "disabling" a submenu,
you can always rebuild the containing menu, replacing the submenu 
you want to "disable" with an ordinary (disabled) menu item.

If you had the menus:

create menu "Inner" as 
       "Inner1" calling inner1,
       "Inner2" calling inner2,
       "Inter3" calling inner3

create menu "Outer" as 
       "Foo" calling foo,
       "Bar" calling bar,
       "Inner" as "Inner"

and you had some sort of routine like

sub Dummy
'
' Do nothing or deliberately crash the program
'
end sub

then you could issue the following Create Menu command
to "Disable" the submenu:

create menu "Outer" as 
       "Foo" calling foo,
       "Bar" calling bar,
       "(Inner" calling dummy

Warning: I haven't tried to compile this code.  Plus, sometimes, 
switching menus too fast will cause MI to crash with an internal error.
So, your mileage may vary.

HTH
Spencer

       

-----Original Message-----
From: B. Thoen [mailto:[EMAIL PROTECTED] 
Sent: Monday, June 21, 2004 10:37 AM
To: Gilbert, Antoine
Cc: MapInfo-L
Subject: Re: MI-L hierarchical menu

On Mon, 21 Jun 2004, Gilbert, Antoine wrote:

> any idea why im unable to disable/enable hierarchical menu items ? (my
> ids are unique !)

I don't think you can disable a menu; you'll have to disable all the menu 
items it contains instead.

- Bill Thoen



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 12320



---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 12323

Reply via email to