PRIM_MD.MenuItem - View Property

View to display when the menu item is clicked

Member of PRIM_MD.MenuItem (PRIM_MD.MenuItem)

Data Type - PRIM_VIEW - Application View

Details

The view property defines an association with a View, this allows displaying the view without having to code it in a click event.

Example

In this example pressing the tab items will open the defined view.
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.Item) Name(#LayoutPageLayoutItem1) Column(#LayoutPageColumn2) Manage(#ViewContainer) Parent(#LayoutPageLayout) Row(#LayoutPageRow1)

    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) View(#View1) Displayposition(1) Height(48) Left(0) Tabposition(1) Top(0) Caption('Show View 1') Width(180)
    Define_Com Class(#prim_md.MenuItem) Name(#MenuItem2) Parent(#Menu) View(#View2) Displayposition(2) Height(48) Left(0) Tabposition(2) Top(48) Caption('Show Tab 2') Width(180)
    Define_Com Class(#prim_md.MenuItem) Name(#MenuItem3) Parent(#Menu) View(#View3) Displayposition(3) Height(48) Left(0) Tabposition(3) Top(96) Caption('Show Tab 3') Width(180)

    Define_Com Class(#Prim_md.ViewContainer) Name(#ViewContainer) Parent(#COM_OWNER) Displayposition(2) Tabposition(2) Left(180) Height(800) Width(1020)
    Define_Com Class(#PRIM_VIEW) Name(#View1) Caption('View 1') Displayposition(1) Height(800) Parent(#ViewContainer) Tabposition(2) Width(1020) Left(340)
    Define_Com Class(#PRIM_VIEW) Name(#View2) Caption('View 2') Displayposition(2) Height(800) Parent(#ViewContainer) Tabposition(3) Width(1020) Left(680)
    Define_Com Class(#PRIM_VIEW) Name(#View3) Caption('View 3') Displayposition(3) Height(800) Parent(#ViewContainer) Tabposition(1) Top(263) Width(1020)

    Define_Com Class(#prim_md.Label) Name(#Label1) Parent(#View1) Displayposition(1) Tabposition(1) Caption('View 1') Height(120) Left(0) Themedrawstyle('Title') Top(0) Width(360)
    Define_Com Class(#prim_md.Label) Name(#Label2) Parent(#View2) Displayposition(1) Tabposition(1) Caption('View 2') Height(120) Left(0) Themedrawstyle('Title') Top(0) Width(360)
    Define_Com Class(#prim_md.Label) Name(#Label3) Parent(#View3) Displayposition(1) Tabposition(1) Caption('View 3') Height(120) Left(0) Themedrawstyle('Title') Top(0) Width(360)

End_Com

See also

All Component Classes

Technical Reference

V14SP2 April 2018