Popup Menu - MenuSizing Property

Controls whether the menu will be sized as designed or to the size of the menu items

Member of Popup Menu (PRIM_PPNL.Menu)

Data Type - Enumeration

Details

The MenuResizing property allows for menus to automatically size to the child menu items, or to appear as designed.

Allowed Values

Enum ValueDescription
NoneNo runtime sizing occurs. Menu appears as designed
PopupMenu is automatically resized based on the child items

Example

In this example, the two menus have been designed with different sizes.
 
MenuItem1 appears the same at design time and runtime, while MenuItem2 is automatically resized
Begin_Com Role(*EXTENDS #PRIM_WEB) Layoutmanager(#TableLayout1)
 
Define_Com Class(#PRIM_TBLO) Name(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1) Height(0.22)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row2) Displayposition(2) Parent(#TableLayout1) Height(0.16)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row3) Displayposition(3) Parent(#TableLayout1) Height(2.62)
 
Define_Com Class(#PRIM_TBLO.Item) Name(#MenuBar1Item1) Column(#Column1) Manage(#MenuBar1) Parent(#TableLayout1) Row(#Row2) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
 
Define_Com Class(#PRIM_PPNL.MenuBar) Name(#MenuBar1) Displayposition(1) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(61) Width(1196) Height(39) Left(2)
Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem1) Caption('MenuItem1') Displayposition(1) Height(39) Menupopup(#PopupMenu1) Parent(#MenuBar1) Tabposition(1) Tabstop(False)
Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem2) Caption('MenuItem2') Displayposition(2) Height(39) Left(100) Menupopup(#PopupMenu2) Parent(#MenuBar1) Tabposition(2) Tabstop(False)
 
Define_Com Class(#PRIM_PPNL.Menu) Name(#PopupMenu1) Left(2) Top(100) Height(165)
Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem3) Caption('MenuItem1') Displayposition(1) Parent(#PopupMenu1) Tabposition(1) Tabstop(False) Width(148)
Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem4) Caption('MenuItem2') Displayposition(2) Parent(#PopupMenu1) Tabposition(2) Tabstop(False) Top(25) Width(148)
 
Define_Com Class(#PRIM_PPNL.Menu) Name(#PopupMenu2) Left(102) Top(100) Height(181) Menusizing(Popup) Width(387)
Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem5) Caption('MenuItem1') Displayposition(1) Parent(#PopupMenu2) Tabposition(1) Tabstop(False) Width(385)
Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem6) Caption('MenuItem2') Displayposition(2) Parent(#PopupMenu2) Tabposition(4) Tabstop(False) Top(25) Width(385)
 
End_Com

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2