How can I change the properties of a menu item?
Applies To: C++Builder 1 or higher
Category: Knowledge Base
- At design-time, I can change different settings of my menu items using the Object Inspector. How can I achieve this at run-time?
-
- Start a new project using File | New Application.
-
- Add a Menu. Insert the menu item New and edit its OnClick
- event:
-
- void __fastcall TForm1::New1Click(TObject *Sender)
- {
- New1->Caption = "Old";
- New1->Enabled = false;
- }
C++Builder Developer's Network
Copyright © Yoto Yotov