Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to enable menu items?

Status
Not open for further replies.

jn03

Programmer
Jan 16, 2003
45
CA
Hi,

I have 2 menus, Customer and Help, in my application. Under these 2 menus there are submenus. When I first open my application, all the submenus are enabled, but if I open a form (from a submenu), then all the submenus are disabled. How can I enable them, especially the Help's submenus which should be enabled all the time? Thanks.
 
Hi Jn03,

Is your form modal? If so, the menu items are always disabled. This is normal behaviour for modal forms.

If you don't want that to happen, don't make the form modal. But that will have other implications. For example, you will have to take special action if you don't want two instances of the form open at the same time.

Mike Lewis
Edinburgh, Scotland
 
Yes, my forms are modal :( guess I have to redo my forms or find a workaround. Thanks everyone for your inputs. Appreciated.
 

Mike, thanks for mentioning the connection between menu disabling and modal forms. This is an issue that isn't well-publicized and sometimes requires trial and error (as was my experience) to fix,

Thanks.

Al
 
Al,

<< This is an issue that isn't well-publicized and sometimes requires trial and error ( >>

Yes, I understand your point of view. If you think about it, a modal form is one that doesn't let you perform any action outside the form. Selecting a menu item would count as an action outside the form, which is why it is disallowed.

On the other hand, VFP does let you access a toolbar from a modal form, which is a little inconsistent. You can also close the application by hitting the X on the title bar. Odd, no?
Mike Lewis
Edinburgh, Scotland
 
Well if you think you guys have a problem understanding this stuff spare a thought for me !!! Programming dinosaur.

Modal versus modeless... Whoa !

All I wanted was a form running and a manimenu.mpr running so when I clicked on the main menu it executed that command....... Nope the menu is deactivated !!!

so then I use thisform.Show(2)

and the behaviour is .... &quot;different&quot; to say the least

and the Keyword Search in Tek-Tips is not much help this time...

I suppose the answer is that I put a command button on the form to execute the request that I want OR I can use the Mainmenu... but not both,,,

Can I ask what does &quot;MODAL&quot;[/b} actually mean ?

John Fox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top