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

# QPOPUPMENU Component

  QPopupMenu provides a popup menu selection control
  QPopupMenu Properties

  Field | Type | R/W | Default

  Alignment | INTEGER | RW | paLeft
  | 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
  AutoPopup | INTEGER | RW | True
  | AutoPopup determines whether the pop-up menu appears automatically when the user clicks the right mouse button.
  Handle | INTEGER | R |
  | Handle is the Windows menu handle for the menu.
  Tag | INTEGER | RW |
  | Tag stores an integer value, but is not used internally.
  WindowHandle | INTEGER | RW |
  | WindowHandle is the handle of the window that uses the menu.

  QPopupMenu Methods

  Method | Type | Description | Params

  AddItems | SUBI | Add Item to Menu | QMENUITEMs, Infinite
  DelIndex | SUB (index AS LONG) | Delete items, by index, from menu | 1
  DelItems | SUBI | Delete items from menu | QMENUITEMs, Infinite
  Insert | SUB (I%, Item AS QMENUITEM) | Insert an item | 2
  Popup | SUB (X%, Y%) | Popup menu at (X,Y) | 2

  QPopupMenu Events

  Event | Type | Occurs when... | Params

  OnPopup | VOID | Just before the pop-up menu appears | 0

  QPopupMenu Examples

        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)

  Prev Component | Contents | Next Component