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


QPOPUPMENU Компонент

QPopupMenu provides a popup menu selection control

QPopupMenu Свойства
ПолеТипR/WПо умолчанию




AlignmentINTEGERRWpaLeft
Alignment determines where the pop-up menu appears when the user clicks the right mouse button.
0 = paLeft - Pop-up menu appears with its top left corner under the mouse pointer
1 = paRight = Pop-up menu appears with its top right corner under the mouse pointer
2 = paCenter - Pop-up menu appears with the top center of the menu under the mouse pointer
AutoPopupINTEGERRWTrue
AutoPopup determines whether the pop-up menu appears automatically when the user clicks the right mouse button.
HandleINTEGERR
Handle is the Windows menu handle for the menu.
TagINTEGERRW
Tag stores an integer value, but is not used internally.
WindowHandleINTEGERRW
WindowHandle is the handle of the window that uses the menu.


QPopupMenu Методы
МетодТипОписаниеПараметры




AddItemsSUBIAdd Item to MenuQMENUITEMs, Infinite
DelIndexSUB (index AS LONG)Delete items, by index, from menu1
DelItemsSUBIDelete items from menuQMENUITEMs, Infinite
InsertSUB (I%, Item AS QMENUITEM)Insert an item2
PopupSUB (X%, Y%)Popup menu at (X,Y)2


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




OnPopupVOIDJust before the pop-up menu appears0


QPopupMenu Примеры
  DIM PopupMenu AS QPopupMenu
  DIM Item1 AS QMenuItem
  DIM Item2 AS QMenuItem

  Item1.Caption = "Item 1"
  Item2.Caption = "Item 2"
  PopupMenu.AddItems(Item1, Item2)

  PopupMenu.Popup(100,100)

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