[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Menus' (#lcl)

TMenuItem.VisibleIndexOf

Gets the ordinal position for the specified menu item in the list of visible menu items.

Declaration

Source position: menus.pp line 272

public function TMenuItem.VisibleIndexOf(

  Item: TMenuItem

):Integer;

Arguments

Item

  

Menu item to locate in the visible MergedItems.

Function result

Ordinal position in the visible Mergeditems for the specified menu item.

Description

VisibleIndexOf is an Integer function used to get the ordinal position for the specified menu item in the list of visible menu items.

Item contains the TMenuItem instance to locate in the MergedItems property. No actions are performed in the method if the Visible property in Item is set to False, and the return value is set to -1.

VisibleIndexOf visits each of the visible items in MergedItems to locate the value specified in Item. The return value is set to the position in VisibleItems where the menu item was found. The return value is -1 if Item is not found in the VisibleItems for the MergedItems property.


Version 3.2 Generated 2024-02-25 Home