Skip to content

Instantly share code, notes, and snippets.

@jyoung
Last active March 12, 2018 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jyoung/98d4246e4a674218ae6c8497619570d2 to your computer and use it in GitHub Desktop.
Save jyoung/98d4246e4a674218ae6c8497619570d2 to your computer and use it in GitHub Desktop.
LANSA Tour Of Heroes Navigation Bar
function options(*DIRECT)
begin_com role(*EXTENDS #PRIM_PANL) displayposition(1) height(57) left(0) tabposition(1) top(0) width(500) layoutmanager(#MainPanelLayout)
* =====================================================================================
* LAYOUTS
* =====================================================================================
define_com class(#PRIM_TBLO) name(#MainPanelLayout)
define_com class(#PRIM_TBLO.Row) name(#LayoutRow1) displayposition(1) parent(#MainPanelLayout)
define_com class(#PRIM_TBLO.Column) name(#LayoutColumn1) displayposition(1) parent(#MainPanelLayout)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem1) alignment(CenterLeft) column(#LayoutColumn1) manage(#DashboardLabel) parent(#MainPanelLayout) row(#LayoutRow1) sizing(ContentWidth) flow(Right) marginbottom(5) marginleft(5) marginright(5) margintop(5)
define_com class(#PRIM_TBLO.Item) name(#LayoutItem2) alignment(CenterLeft) column(#LayoutColumn1) manage(#HeroesLabel) parent(#MainPanelLayout) row(#LayoutRow1) sizing(ContentWidth) flow(Right) marginbottom(5) marginleft(5) marginright(5) margintop(5)
* =====================================================================================
* UI COMPONENTS
* =====================================================================================
define_com class(#PRIM_LABL) name(#DashboardLabel) caption('Dashboard') displayposition(1) ellipses(Word) height(25) left(5) parent(#COM_OWNER) tabposition(1) tabstop(False) top(16) verticalalignment(Center) width(69) themedrawstyle('NavBarButton') marginleft(5) marginright(5) marginbottom(5) margintop(5) componenttag('')
define_com class(#PRIM_LABL) name(#HeroesLabel) caption('Heroes') displayposition(2) ellipses(Word) height(25) left(84) parent(#COM_OWNER) tabposition(2) tabstop(False) top(16) verticalalignment(Center) width(49) themedrawstyle('NavBarButton') marginbottom(5) marginleft(5) marginright(5) margintop(5) componenttag('')
* =====================================================================================
* EVENTS
* =====================================================================================
define_evt name(Clicked)
define_map for(*INPUT) class(#PRIM_ALPH) name(#view)
* =====================================================================================
* ROUTINES
* =====================================================================================
evtroutine handling(#DashboardLabel.Click #HeroesLabel.Click) com_sender(#pSender)
signal event(Clicked) view(#pSender.ComponentTag)
endroutine
end_com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment