PRIM_MD.MenuItem - Dialog Property

Dialog to display when the menu item is clicked

Member of PRIM_MD.MenuItem (PRIM_MD.MenuItem)

Data Type - PRIM_DLG - Simple modal dialog with shroud

Details

The dialog property defines an association with a Dialog, this allows for opening of the dialog without having to code it in a click event.

Example

In this example pressing the menu item will open the defined dialog.
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME) Layoutmanager(#LayoutPageLayout)
    
    Define_Com Class(#PRIM_TBLO) Name(#LayoutPageLayout)
    Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutPageRow1) Displayposition(1) Parent(#LayoutPageLayout)
    Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutPageColumn1) Displayposition(1) Parent(#LayoutPageLayout) Units(Pixels) Width(180)
    Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutPageColumn2) Displayposition(2) Parent(#LayoutPageLayout)
    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutPageItem) Column(#LayoutPageColumn1) Parent(#LayoutPageLayout) Row(#LayoutPageRow1)
    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutPageLayoutItem2) Manage(#Menu) Parent(#LayoutPageLayout) Row(#LayoutPageRow1) Column(#LayoutPageColumn1)
   
    Define_Com Class(#PRIM_TBLO) Name(#LayoutMenu)
    Define_Com Class(#PRIM_TBLO.Column) Name(#LayoutMenuColum) Parent(#LayoutMenu) Displayposition(1)
    Define_Com Class(#PRIM_TBLO.Row) Name(#LayoutMenuRow1) Parent(#LayoutMenu) Displayposition(1)
    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMenuItem1) Manage(#MenuItem1) Parent(#LayoutMenu) Row(#LayoutMenuRow1) Column(#LayoutMenuColum) Flow(Down) Sizing(FitToWidth) Alignment(TopCenter)
    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMenuItem2) Manage(#MenuItem2) Parent(#LayoutMenu) Row(#LayoutMenuRow1) Column(#LayoutMenuColum) Flow(Down) Sizing(FitToWidth) Alignment(TopCenter)
    Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutMenuItem3) Manage(#MenuItem3) Parent(#LayoutMenu) Row(#LayoutMenuRow1) Column(#LayoutMenuColum) Flow(Down) Sizing(FitToWidth) Alignment(TopCenter)
    
    Define_Com Class(#PRIM_MD.Menu) Name(#Menu) Displayposition(1) Height(800) Parent(#COM_OWNER) Tabposition(1) Themedrawstyle('DarkTitle') Width(180) Layoutmanager(#LayoutMenu)
    Define_Com Class(#prim_md.MenuItem) Name(#MenuItem1) Parent(#Menu) Displayposition(1) Height(48) Left(0) Tabposition(1) Top(0) Caption('Show Dialog 1') Width(180) Dialog(#Dialog1)
    Define_Com Class(#prim_md.MenuItem) Name(#MenuItem2) Parent(#Menu) Displayposition(2) Height(48) Left(0) Tabposition(2) Top(48) Caption('Show Dialog 2') Width(180) Dialog(#Dialog2)
    Define_Com Class(#prim_md.MenuItem) Name(#MenuItem3) Parent(#Menu) Displayposition(3) Height(48) Left(0) Tabposition(3) Top(96) Caption('Show Dialog 3') Width(180) Dialog(#Dialog3)
    
    Define_Com Class(#PRIM_DLG) Name(#Dialog1) Height(400) Width(250) Autoclose(True)
    Define_Com Class(#PRIM_DLG) Name(#Dialog2) Height(400) Width(250) Autoclose(True)
    Define_Com Class(#PRIM_DLG) Name(#Dialog3) Height(400) Width(250) Autoclose(True)
    
    Define_Com Class(#prim_md.Label) Name(#Label1) Parent(#Dialog1) Displayposition(1) Tabposition(1) Caption('Dialog 1') Height(120) Left(0) Themedrawstyle('Title') Top(0) Width(360)
    Define_Com Class(#prim_md.Label) Name(#Label2) Parent(#Dialog2) Displayposition(1) Tabposition(1) Caption('Dialog 2') Height(120) Left(0) Themedrawstyle('Title') Top(0) Width(360)
    Define_Com Class(#prim_md.Label) Name(#Label3) Parent(#Dialog3) Displayposition(1) Tabposition(1) Caption('Dialog 3') Height(120) Left(0) Themedrawstyle('Title') Top(0) Width(360)

End_Com

See also

All Component Classes

Technical Reference

V14SP2 April 2018