Push Button - MenuSeparator Property

Show a separator between the button and the menu

Member of Push Button (PRIM_PHBN)

Data Type - Boolean

Details

The MenuSeparator property specifies where the button will show the menu automatically or whether it will fire the Click event of the Default menu item.
 
When False, clicking the button will show the menu.

Allowed Values

Enum ValueDescription
BottomShow below the button
RightShow to the right of the button

Example

This example shows two buttons configured to use the same popup menu.
 
The MenuPosition and MenuSeparator properties have been used on the second button to change the where the menu appears and how the button manages a click and Enter.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientwidth(660) Clientheight(338) Componentversion(2) Top(215) Left(237)
 
   Define_Com Class(#PRIM_PHBN) Name(#Button1) Caption('Button1') Displayposition(1) Left(7) Parent(#COM_OWNER) Tabposition(1) Top(6) Menu(#PopupMenu1) Width(90)
   Define_Com Class(#PRIM_PHBN) Name(#Button2) Caption('Button2') Displayposition(2) Left(111) Parent(#COM_OWNER) Tabposition(2) Top(7) Width(138) Menu(#PopupMenu1) Menuposition(Right) Menuseparator(True)
   Define_Com Class(#PRIM_PMNU) Name(#PopupMenu1)
   Define_Com Class(#PRIM_MITM) Name(#MenuItem1) Caption('Item1') Displayposition(1) Parent(#PopupMenu1)
   Define_Com Class(#PRIM_MITM) Name(#MenuItem2) Displayposition(2) Parent(#PopupMenu1) Caption('Item2') Default(True)
   Define_Com Class(#PRIM_MITM) Name(#MenuItem3) Displayposition(3) Parent(#PopupMenu1) Caption('Item3')
 
   Evtroutine Handling(#MenuItem1.Click #MenuItem2.Click #MenuItem3.Click) Com_Sender(#Sender)
 
      #Com_owner.Caption := #Sender.Caption
 
   Endroutine
 
End_Com

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2