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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

menu and visible

Status
Not open for further replies.

vlitim

Programmer
Sep 2, 2000
393
GB
I keep getting this error when trying to set a submenu's visible property


can't set visible property from a parent menu


I can't figure out what I am doing wrong!
 
I think that means you are setting a menu property when I menu it is a child of is already set to something else,
 
Can't replicate your error message - you're not using an MDI interface are you?

If no MDI interface the following should solve the problem

you will need to create the sub-menu option(s) as a part of a control array: for example:

assuming a sub-menu with three options (copy,cut & paste)

set the properties of the first one as:
Caption Copy
Name mnuClipboard
Index 0

set the properties of the second one as:
Caption Cut
Name mnuClipboard
Index 1

set the properties of the third one as:
Caption Paste
Name mnuClipboard
Index 2

now you can write code such as

mnuClipBoard(2).visible = false 'hide paste menu option

Kate
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top