Menu Item - MenuPopup Property

Popup menu to be displayed as a sub-menu

Member of Menu Item (PRIM_PPNL.MenuItem)

Data Type - PRIM_PPNL - Popup panel

Details

The MenuPopup property is a reference a Popup Panel to be used as a submenu rather that a Popup Menu.
 
Using a Popup Menu allows for free form menus to be designed.

Example

In this example, MenuItem4 has a popup panel showing 9 labels, each of which might act like a menu item.
 
Construction of menus is easily managed in the designer. This code is provided for reference purposes.
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(#LayoutItem1) Alignment(TopLeft) Column(#Column1) Flow(Down) Manage(#Label1) Parent(#TableLayout1) Row(#Row1)
   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_TBLO) Name(#TableLayout2)
   Define_Com Class(#PRIM_TBLO.Column) Name(#Column2) Displayposition(1) Parent(#TableLayout2)
   Define_Com Class(#PRIM_TBLO.Column) Name(#Column3) Displayposition(2) Parent(#TableLayout2)
   Define_Com Class(#PRIM_TBLO.Column) Name(#Column4) Displayposition(3) Parent(#TableLayout2)
   Define_Com Class(#PRIM_TBLO.Row) Name(#Row4) Displayposition(1) Parent(#TableLayout2)
   Define_Com Class(#PRIM_TBLO.Row) Name(#Row5) Displayposition(2) Parent(#TableLayout2)
   Define_Com Class(#PRIM_TBLO.Row) Name(#Row6) Displayposition(3) Parent(#TableLayout2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem2) Alignment(TopLeft) Column(#Column2) Flow(Down) Manage(#Label2) Parent(#TableLayout2) Row(#Row4) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem3) Alignment(TopLeft) Column(#Column3) Flow(Down) Manage(#Label3) Parent(#TableLayout2) Row(#Row4) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem4) Alignment(TopLeft) Column(#Column4) Flow(Down) Manage(#Label4) Parent(#TableLayout2) Row(#Row4) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem5) Alignment(TopLeft) Column(#Column2) Flow(Down) Manage(#Label5) Parent(#TableLayout2) Row(#Row5) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem6) Alignment(TopLeft) Column(#Column3) Flow(Down) Manage(#Label6) Parent(#TableLayout2) Row(#Row5) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem7) Alignment(TopLeft) Column(#Column4) Flow(Down) Manage(#Label7) Parent(#TableLayout2) Row(#Row5) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem8) Alignment(TopLeft) Column(#Column2) Flow(Down) Manage(#Label8) Parent(#TableLayout2) Row(#Row6) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem9) Alignment(TopLeft) Column(#Column3) Flow(Down) Manage(#Label9) Parent(#TableLayout2) Row(#Row6) Margintop(2) Marginbottom(2) Marginleft(2) Marginright(2)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem10) Alignment(TopLeft) Column(#Column4) Flow(Down) Manage(#Label10) Parent(#TableLayout2) Row(#Row6) 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(53)
   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(101)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem5) Caption('MenuItem1') Displayposition(1) Parent(#PopupMenu2) Tabposition(1) Tabstop(False) Width(148)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem6) Caption('MenuItem2') Displayposition(2) Parent(#PopupMenu2) Tabposition(4) Tabstop(False) Top(25) Width(148)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem7) Caption('MenuItem3') Displayposition(3) Height(39) Left(200) Menupopup(#PopupMenu3) Parent(#MenuBar1) Tabposition(3) Tabstop(False)
 
   Define_Com Class(#PRIM_PPNL.Menu) Name(#PopupMenu3) Left(202) Top(100) Height(53)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem8) Caption('MenuItem1') Displayposition(1) Parent(#PopupMenu3) Tabposition(1) Tabstop(False) Width(148)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem9) Caption('MenuItem2') Displayposition(2) Parent(#PopupMenu3) Tabposition(2) Tabstop(False) Top(25) Width(148)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem11) Caption('MenuItem4') Displayposition(4) Height(39) Left(300) Menupopup(#Popup1) Parent(#MenuBar1) Tabposition(4) Tabstop(False)
 
   Define_Com Class(#PRIM_PPNL.Menu) Name(#PopupMenu4) Height(54) Left(251) Top(151)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem13) Caption('MenuItem1') Displayposition(1) Parent(#PopupMenu4) Tabposition(1) Tabstop(False) Width(148)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem14) Caption('MenuItem2') Displayposition(2) Parent(#PopupMenu4) Tabposition(2) Tabstop(False) Top(25) Width(148)
 
   Define_Com Class(#PRIM_PPNL) Name(#Popup1) Closeonclick(True) Left(302) Top(100) Height(93) Width(363) Layoutmanager(#TableLayout2)
   Define_Com Class(#PRIM_LABL) Name(#Label1) Caption('Heading') Displayposition(2) Ellipses(Word) Height(59) Left(0) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(0) Verticalalignment(Center) Width(1200) Marginleft(4) Themedrawstyle('Title+DarkTitle')
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem10) Caption('MenuItem3') Displayposition(3) Parent(#PopupMenu2) Tabposition(3) Tabstop(False) Top(50) Width(148) Menupopup(#PopupMenu4)
   Define_Com Class(#PRIM_PPNL.MenuItem) Name(#MenuItem12) Caption('MenuItem4') Displayposition(4) Parent(#PopupMenu2) Tabposition(2) Tabstop(False) Top(75) Width(148)
   Define_Com Class(#PRIM_LABL) Name(#Label2) Caption('Label2') Displayposition(1) Ellipses(Word) Height(27) Left(2) Parent(#Popup1) Tabposition(1) Tabstop(False) Top(2) Verticalalignment(Center) Width(117) Themedrawstyle('MediumTitle') Alignment(Center)
   Define_Com Class(#PRIM_LABL) Name(#Label3) Caption('Label3') Displayposition(2) Ellipses(Word) Height(27) Left(123) Parent(#Popup1) Tabposition(2) Tabstop(False) Top(2) Verticalalignment(Center) Width(116) Themedrawstyle('MediumTitle') Alignment(Center)
   Define_Com Class(#PRIM_LABL) Name(#Label4) Caption('Label4') Displayposition(3) Ellipses(Word) Height(27) Left(243) Parent(#Popup1) Tabposition(3) Tabstop(False) Top(2) Verticalalignment(Center) Width(116) Themedrawstyle('MediumTitle') Alignment(Center)
   Define_Com Class(#PRIM_LABL) Name(#Label5) Caption('Label5') Displayposition(4) Ellipses(Word) Height(26) Left(2) Parent(#Popup1) Tabposition(4) Tabstop(False) Top(33) Verticalalignment(Center) Width(117) Themedrawstyle('MediumTitle') Alignment(Center)
   Define_Com Class(#PRIM_LABL) Name(#Label6) Caption('Label6') Displayposition(5) Ellipses(Word) Height(26) Left(123) Parent(#Popup1) Tabposition(5) Tabstop(False) Top(33) Verticalalignment(Center) Width(116) Themedrawstyle('MediumTitle') Alignment(Center)
   Define_Com Class(#PRIM_LABL) Name(#Label7) Caption('Label7') Displayposition(6) Ellipses(Word) Height(26) Left(243) Parent(#Popup1) Tabposition(6) Tabstop(False) Top(33) Verticalalignment(Center) Width(116) Themedrawstyle('MediumTitle') Alignment(Center)
   Define_Com Class(#PRIM_LABL) Name(#Label8) Caption('Label8') Displayposition(7) Ellipses(Word) Height(26) Left(2) Parent(#Popup1) Tabposition(7) Tabstop(False) Top(63) Verticalalignment(Center) Width(117) Themedrawstyle('MediumTitle') Alignment(Center)
   Define_Com Class(#PRIM_LABL) Name(#Label9) Caption('Label9') Displayposition(8) Ellipses(Word) Height(26) Left(123) Parent(#Popup1) Tabposition(8) Tabstop(False) Top(63) Verticalalignment(Center) Width(116) Themedrawstyle('MediumTitle') Alignment(Center)
   Define_Com Class(#PRIM_LABL) Name(#Label10) Caption('Label10') Displayposition(9) Ellipses(Word) Height(26) Left(243) Parent(#Popup1) Tabposition(9) Tabstop(False) Top(63) Verticalalignment(Center) Width(116) Themedrawstyle('MediumTitle') Alignment(Center)
 
End_Com

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2