Menus.TMenuItem Methods
Delphi Information
| procedure ActionChange(Sender: TObject; CheckDefaults: Boolean); dynamic; | |
| procedure AdvancedDrawItem(ACanvas: TCanvas;
ARect: TRect; State: TOwnerDrawState; TopLevel: Boolean); virtual; | |
| procedure DoDrawText(ACanvas: TCanvas;
const ACaption: string; var Rect: TRect; Selected: Boolean; Flags: Integer); | |
| procedure DrawItem(ACanvas: TCanvas; ARect: TRect; Selected: Boolean); virtual; | |
| function GetActionLinkClass(): TMenuActionLinkClass; dynamic; | |
| function GetHandle(): HMENU; | |
| function GetCount(): Integer; | |
| function GetItem(Index: Integer): TMenuItem; | |
| function GetMenuIndex(): Integer; | |
| function GetAutoHotkeys(): Boolean; | |
| function GetAutoLineReduction(): Boolean; | |
| function InsertNewLine(ABefore: Boolean; AItem: TMenuItem): Integer; | |
| procedure MeasureItem(ACanvas: TCanvas; var Width: Integer; var Height: Integer); virtual; | |
| procedure MenuChanged(Rebuild: Boolean); virtual; | |
| procedure SetBreak(Value: TMenuBreak); | |
| procedure SetCaption(const Value: string); | |
| procedure SetChecked(Value: Boolean); | |
| procedure SetDefault(Value: Boolean); | |
| procedure SetEnabled(Value: Boolean); | |
| procedure SetGroupIndex(Value: Byte); | |
| procedure SetImageIndex(Value: TImageIndex); | |
| procedure SetMenuIndex(Value: Integer); | |
| procedure SetRadioItem(Value: Boolean); | |
| procedure SetShortCut(Value: TShortCut); | |
| procedure SetVisible(Value: Boolean); | |
| procedure UpdateItems | |
| procedure InitiateAction virtual; |
Calls the action link's Update method if the menu item is associated with an action link. |
| procedure Insert(Index: Integer; Item: TMenuItem); |
Inserts a menu item into a specified position in the Items array. |
| procedure Delete(Index: Integer); |
Removes a menu item from the Items property array. |
| procedure Clear |
Removes and frees all menu items listed in the Items property. |
| procedure Click virtual; |
Simulates a mouse click. |
| function Find(ACaption: string): TMenuItem; |
Locates a menu item in the Items property array given its caption. |
| function IndexOf(Item: TMenuItem): Integer; |
Returns the position of a menu item within the Items array. |
| function IsLine(): Boolean; |
Indicates whether the menu item represents a separator bar. |
| function GetImageList(): TCustomImageList; |
Returns the Image list that supplies an image for the menu item. |
| function GetParentMenu(): TMenu; |
Returns the main menu of which the menu item is part. |
| function NewTopLine(): Integer; |
Inserts a separator bar at the beginning of the Items property array. |
| function NewBottomLine(): Integer; |
Inserts a separator bar at the end of the Items property array. |
| function InsertNewLineBefore(AItem: TMenuItem): Integer; |
Inserts a separator bar before a specified item from the Items property array. |
| function InsertNewLineAfter(AItem: TMenuItem): Integer; |
Inserts a separator bar after a specified item from the Items property array. |
| procedure Add(Item: TMenuItem); overload; |
Adds one or more menu items to the end of the Items property array. |
| procedure Add(const AItems: array of TMenuItem); overload; |
Adds one or more menu items to the end of the Items property array. |
| procedure Remove(Item: TMenuItem); |
Removes a menu item from the Items property array |
| function RethinkHotkeys(): Boolean; |
Adjusts the captions of subitems so that every item has an accelerator and there are no duplicate accelerator keys. |
| function RethinkLines(): Boolean; |
Removes superfluous separator lines from the Items property array. |
Unit: Menus
Type: method
Visibility: public
Member Of: TMenuItem
C++ Information
| Menus::TMenuItem * __fastcall operator(int Index); | |
| dynamic virtual void __fastcall ActionChange(System::TObject * Sender, bool CheckDefaults); | |
| virtual void __fastcall AdvancedDrawItem(Graphics::TCanvas * ACanvas,
const Types::TRect & ARect, System::Set<Windows::Windows__1,0,12> State, bool TopLevel); | |
| void __fastcall DoDrawText(Graphics::TCanvas * ACanvas,
System::UnicodeString ACaption, Types::TRect & Rect, bool Selected, int Flags); | |
| virtual void __fastcall DrawItem(Graphics::TCanvas * ACanvas, const Types::TRect & ARect, bool Selected); | |
| dynamic virtual System::TMetaClass * __fastcall GetActionLinkClass(void); | |
| HMENU__ * __fastcall GetHandle(void); | |
| int __fastcall GetCount(void); | |
| Menus::TMenuItem * __fastcall GetItem(int Index); | |
| int __fastcall GetMenuIndex(void); | |
| bool __fastcall GetAutoHotkeys(void); | |
| bool __fastcall GetAutoLineReduction(void); | |
| int __fastcall InsertNewLine(bool ABefore, Menus::TMenuItem * AItem); | |
| virtual void __fastcall MeasureItem(Graphics::TCanvas * ACanvas, int & Width, int & Height); | |
| virtual void __fastcall MenuChanged(bool Rebuild); | |
| void __fastcall SetBreak(Menus::TMenuBreak Value); | |
| void __fastcall SetCaption(System::UnicodeString Value); | |
| void __fastcall SetChecked(bool Value); | |
| void __fastcall SetDefault(bool Value); | |
| void __fastcall SetEnabled(bool Value); | |
| void __fastcall SetGroupIndex(unsigned char Value); | |
| void __fastcall SetImageIndex(int Value); | |
| void __fastcall SetMenuIndex(int Value); | |
| void __fastcall SetRadioItem(bool Value); | |
| void __fastcall SetShortCut(unsigned short Value); | |
| void __fastcall SetVisible(bool Value); | |
| void __fastcall UpdateItems(void); | |
| virtual void __fastcall InitiateAction(void); |
Calls the action link's Update method if the menu item is associated with an action link. |
| void __fastcall Insert(int Index, Menus::TMenuItem * Item); |
Inserts a menu item into a specified position in the Items array. |
| void __fastcall Delete(int Index); |
Removes a menu item from the Items property array. |
| void __fastcall Clear(void); |
Removes and frees all menu items listed in the Items property. |
| virtual void __fastcall Click(void); |
Simulates a mouse click. |
| Menus::TMenuItem * __fastcall Find(System::UnicodeString ACaption); |
Locates a menu item in the Items property array given its caption. |
| int __fastcall IndexOf(Menus::TMenuItem * Item); |
Returns the position of a menu item within the Items array. |
| bool __fastcall IsLine(void); |
Indicates whether the menu item represents a separator bar. |
| Imglist::TCustomImageList * __fastcall GetImageList(void); |
Returns the Image list that supplies an image for the menu item. |
| Menus::TMenu * __fastcall GetParentMenu(void); |
Returns the main menu of which the menu item is part. |
| int __fastcall NewTopLine(void); |
Inserts a separator bar at the beginning of the Items property array. |
| int __fastcall NewBottomLine(void); |
Inserts a separator bar at the end of the Items property array. |
| int __fastcall InsertNewLineBefore(Menus::TMenuItem * AItem); |
Inserts a separator bar before a specified item from the Items property array. |
| int __fastcall InsertNewLineAfter(Menus::TMenuItem * AItem); |
Inserts a separator bar after a specified item from the Items property array. |
| void __fastcall Add(Menus::TMenuItem * Item); |
Adds one or more menu items to the end of the Items property array. |
| void __fastcall Remove(Menus::TMenuItem * Item); |
Removes a menu item from the Items property array |
| bool __fastcall RethinkHotkeys(void); |
Adjusts the captions of subitems so that every item has an accelerator and there are no duplicate accelerator keys. |
| bool __fastcall RethinkLines(void); |
Removes superfluous separator lines from the Items property array. |
Unit: Menus
Type: method
Visibility: public
Member Of: TMenuItem
Description
Embarcadero Technologies does not currently have any additional information. Please help us document this topic by using the Discussion page!