Control - FixedPosition Property

Fix the control position so that it does not move if the parent is scrolled

Member of Control (PRIM_CTRL)

Data Type - Boolean

Details

The FixedPosition property is used to anchor a control so that it is no longer moved if its parent is scrolled.

Example

In this example, the Title Bar at the top of the page and the "Floating Control" are both fixed. When the page is scrolled down, they will remain in the same place while the remainder of the page moves beneath them.
Begin_Com Role(*EXTENDS #PRIM_WEB) Theme(#SYS_THEME<2015Orange>) Layoutmanager(#TableLayout1) Width(832)
 
   Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1)
   Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(Theme50)
 
   Define_Com Class(#PRIM_VS.Style) Name(#Style2) Fontsize(16)
 
   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(#LayoutItem1) Column(#Column1) Manage(#Panel1) Parent(#TableLayout1) Row(#Row1) Sizing(FitToWidth) Alignment(TopCenter) Flow(Down)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem2) Column(#Column1) Manage(#Panel2) Parent(#TableLayout1) Row(#Row1) Sizing(FitToWidth) Alignment(TopCenter) Flow(Down)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem3) Column(#Column1) Manage(#Panel3) Parent(#TableLayout1) Row(#Row1) Sizing(FitToWidth) Alignment(TopCenter) Flow(Down)
   Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem4) Column(#Column1) Flow(Down) Manage(#Label1) Parent(#TableLayout1) Row(#Row1) Sizing(None) Alignment(TopCenter)
   Define_Com Class(#PRIM_TBLO.Item) Name(#Label2Item1) Manage(#Label2) Parent(#TableLayout1) Row(#Row1) Sizing(None) Column(#Column1) Alignment(TopLeft) Margintop(150) Marginleft(20)
 
   Define_Com Class(#PRIM_LABL) Name(#Panel1) Displayposition(2) Height(65) Left(0) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(0) Width(814) Themedrawstyle('DarkTitle') Caption('Title Bar') Fixedposition(True) Alignment(Center) Verticalalignment(Center) Style(#Style2)
   Define_Com Class(#PRIM_LABL) Name(#Panel2) Displayposition(3) Height(48) Left(0) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(65) Width(814) Themedrawstyle('MediumTitle')
   Define_Com Class(#PRIM_LABL) Name(#Panel3) Displayposition(5) Height(65) Left(0) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(874) Width(814) Themedrawstyle('DarkTitle') Caption('Footer') Alignment(Center) Verticalalignment(Center) Style(#Style2)
   Define_Com Class(#PRIM_PANL) Name(#Label1) Displayposition(4) Height(761) Left(41) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Top(113) Width(733) Style(#Style1)
   Define_Com Class(#PRIM_LABL) Name(#Label2) Caption('Floating Control') Displayposition(1) Ellipses(Word) Height(205) Left(20) Parent(#COM_OWNER) Tabposition(5) Tabstop(False) Top(150) Width(222) Fixedposition(True) Verticalalignment(Center) Alignment(Center) Themedrawstyle('MediumTitle')
 
End_Com

See also

All Component Classes

Technical Reference

Febuary 18 V14SP2