Hiding Menu Items

F

Fred W.

(using VS2005) I want to hide a menu item, but setting the Visible property
to False does not work! If it's initialy false and I set it to true, that
works. Any suggestions?

- Fred
 
P

pvdg42

Fred W. said:
(using VS2005) I want to hide a menu item, but setting the Visible
property to False does not work! If it's initialy false and I set it to
true, that works. Any suggestions?

- Fred
Please describe the circumstances in detail, as I am unable to recreate your
problem in a VS 2005 Windows app.

I created a simple File menu:

File
Save
Exit

on a Windows form, then used an existing button.click event procedure to:

mnuFileExit.Visible = false;

mnuFileSave.Enabled = false;

Worked exactly as expected.
 
P

pvdg42

Fred W. said:
Looks like I need to use the "Available" property. Thanks ...
Yes, Available appears to make menu items disappear and appear as well.

Actually, if you observe menu item behavior in commercial products, you'll
find that the prevalent technique is to disable menu items when use is not
appropriate, instead of hiding them. You might consider Enabled true/false.
That way, your users get used to a "standard" menu presentation, but cannot
select inappropriate choices. Just my opinion.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top