Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Sup,

 

I am looking to enable/disable menu options on a parent form, from inside a child form subroutine.

 

After doing some searching I found that someone accomplished this by using:

 

MdiParent.Menu.MenuItems[0].MenuItems[0].Enabled = False

 

However, when I tried using this (and many variations), I got the following tooltip style pop-up message:

 

Property access must assign to the property or use its value

 

Does anyone have an info that could help a brother out?

 

Thanks,

Guest mutant
Posted

He might be using C# and in C# its brackets instead of ().

BTW, that code works fine for me, are you you have a menu at that position?(0,0)

Posted
I thought about the fact he may be using C#, but if you use his code in VB, you get the exact error message that he mentioned. That is why I assumed he was using VB.
Guest mutant
Posted
Im sorry then :) , I was testing it in C#.
Posted

Toolbar Hiding, ToolbarButton enabling

 

Thanks. You guys were right about the parens instead of brackets. I ended up figured it out after a couple HOURS. Grr.

 

I'm more comfortable in C++ but am using VB to get used to it.

 

Actually, I have another problem that I haven't found a solution for:

 

How would I go about hiding/showing the toolbar on a parent from the child form. Same for enabling/disabling buttons on that toolbar?

 

Thanks again,

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...