Board index » cppbuilder » Disable main menu items

Disable main menu items

I have a main form with a menu bar and menus (File, Help, etc.) and want to
disable them while a lengthy operation is being done but I can't seem to
find the right syntax  either in Help or AutoComplete.  The code below won't
compile.
MainMenu->Items->Count will compile but when I debug is undefined.

What's happening here?

Thanks

  for (int i = 0; i < MainMenu->Items->Count; i++)
    {
    MainMenu->Items[i]->Enabled = isEnabled;  // offending line
    }
--
Robert N. Lockwood

RNLockw...@attglobal.net

 

Re:Disable main menu items


That needs to be this instead:

    MainMenu->Items->Item[i]->Enabled = isEnabled;

Gambit

Quote
"Robert Lockwood" <rnlockw...@attglobal.net> wrote in message

news:3c5ecf81$1_1@dnews...
Quote
>     MainMenu->Items[i]->Enabled = isEnabled;

Re:Disable main menu items


Many thanks,

Nate

Quote
"Remy Lebeau" <gambi...@gte.net> wrote in message news:3c5ee13b$1_1@dnews...
> That needs to be this instead:

>     MainMenu->Items->Item[i]->Enabled = isEnabled;

> Gambit

> "Robert Lockwood" <rnlockw...@attglobal.net> wrote in message
> news:3c5ecf81$1_1@dnews...

> >     MainMenu->Items[i]->Enabled = isEnabled;

Other Threads