ScreenTop sets the distance from the top of the screen |
Member of Control (PRIM_CTRL)
Data Type - Integer
The ScreenTop property specifies the position on the control on the screen.
To determine the positon on the control relative to its parent, use the Top property.
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Caption('Screen Positioning Example') Height(207) Left(498) Top(312) Width(360) Clientwidth(344) Clientheight(168) 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)
Define_Com Class(#PRIM_TBLO.Item) Name(#TopleftItem1) Alignment(TopLeft) Column(#Column1) Manage(#Topleft) Parent(#TableLayout1) Row(#Row1) Sizing(None) Margintop(4) Marginleft(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#TopRightItem1) Alignment(TopRight) Column(#Column1) Manage(#TopRight) Parent(#TableLayout1) Row(#Row1) Sizing(None) Margintop(4) Marginright(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#BottomLeftItem1) Alignment(BottomLeft) Column(#Column1) Manage(#BottomLeft) Parent(#TableLayout1) Row(#Row1) Sizing(None) Marginleft(4) Marginbottom(4)
Define_Com Class(#PRIM_TBLO.Item) Name(#BottomRightItem1) Alignment(BottomRight) Column(#Column1) Manage(#BottomRight) Parent(#TableLayout1) Row(#Row1) Sizing(None) Marginbottom(4) Marginright(4)
Define_Com Class(#PRIM_PHBN) Name(#Topleft) Caption('Top Left') Displayposition(3) Left(4) Parent(#COM_OWNER) Tabposition(3) Top(4) Width(100)
Define_Com Class(#PRIM_PHBN) Name(#TopRight) Caption('Top Right') Displayposition(4) Left(240) Parent(#COM_OWNER) Tabposition(4) Top(4) Width(100)
Define_Com Class(#PRIM_PHBN) Name(#BottomLeft) Caption('Bottom Left') Displayposition(2) Left(4) Parent(#COM_OWNER) Tabposition(2) Top(139) Width(100)
Define_Com Class(#PRIM_PHBN) Name(#BottomRight) Caption('Bottom Right') Displayposition(1) Left(240) Parent(#COM_OWNER) Tabposition(1) Top(139) Width(100)
Evtroutine Handling(#Topleft.Click)
#Com_owner.ScreenTop #Com_owner.Screenleft := 0
Endroutine
Evtroutine Handling(#TopRight.Click)
#Com_owner.ScreenTop := 0
#Com_owner.ScreenLeft := #sys_appln.Monitors<1>.WorkWidth - #Com_owner.Width
Endroutine
Evtroutine Handling(#BottomLeft.Click)
#Com_owner.Screenleft := 0
#Com_owner.ScreenTop := #sys_appln.Monitors<1>.WorkHeight - #Com_owner.Height
Endroutine
Evtroutine Handling(#BottomRight.Click)
#Com_owner.ScreenTop := #sys_appln.Monitors<1>.WorkHeight - #Com_owner.Height
#Com_owner.ScreenLeft := #sys_appln.Monitors<1>.WorkWidth - #Com_owner.Width
Endroutine
End_Com