Rapid-Q Documentation by William Yu (c)1999-2000 Appendix A: QMENUITEM


QMENUITEM Компонент

QMenuItem is used to describe the properties of an item in a menu. It is not meant to be a stand-alone component. You usually add a QMenuItem to a QMainMenu or QPopupMenu.

QMenuItem Свойства
ПолеТипR/WПо умолчаниюПоддерживается





CaptionSTRINGRWWXG
Caption определяет текст of the menu item.
CheckedINTEGERRWW
Checked specifies whether a check mark should appear beside the caption.
CommandINTEGERRW
Command is the Windows command ID associated with the menu item.
CountINTEGERRW
Count is the number of subitems of the menu item.
EnabledINTEGERRWTrueW
HandleINTEGERRW
HintSTRINGRWW
MenuIndexINTEGERRWW
MenuIndex is index of the menu item within its parent menu.
RadioItemINTEGERRWFalseW
RadioItem specifies whether the menu item is mutually exclusive with other menu items in its group.
ShortCutSTRINGRWW
ShortCut specifies the key combination users can type to quickly access the menu item.
TagINTEGERRWWXG
VisibleINTEGERRWTrueW
Visible determines whether the menu item should be displayed.


QMenuItem Методы
МетодТипОписаниеПараметрыПоддерживается





AddItemsSUBIAdd Subitems to MenuItemQMENUITEMs, InfiniteWXG
DelIndexSUB (index AS LONG)Delete items, by index, from menu1W
DelItemsSUBIDelete items from menuQMENUITEMs, InfiniteW
InsertSUB (I%, Item AS QMENUITEM)Insert an item2W

QMenuItem События
СобытиеТипПроисходит когда...ПараметрыПоддерживается





OnClickVOIDUser selects item0WXG


QMenuItem Примеры
  DIM Form AS QForm
  DIM MainMenu AS QMainMenu
  DIM Item1 AS QMenuItem

  MainMenu.Parent = Form
  Item1.Caption = "&File"
  MainMenu.AddItems Item1

  Form.ShowModal

Предыдущий Компонент Содержание Следующий Компонент