Sizing behavior of a list cell allowing for the content to only use a portion of the cell
Member of List Column (PRIM_LIST.Column)
Data Type - Enumeration
The CellSizing property governs the sizing behavior of the contents of the cell. Typically, it is desirable for the contents to fill the available space. However, Button and Image column in particular benefit from being able to define the cell as being a specific size, regardless of the width or height of the column or row. CellAlignment and the CellMarginLeft, CellMarginRight, CellMarginTop and CellMarginBottom properties can be used to position it. When sizing cells based on their content, it is necessary for the rows in the list to be able to resize appropriately. The RowHeight and RowSizing properties need to be set to 0 and Individual respectively.
Enum Value | Description |
---|---|
ContentHeight | The CellHeight will be governed by the contents of the control e.g. The text of a label. The CellWidth will remain unchanged |
ContentHeightFitToWidth | The CellHeight will be governed by the contents of the control e.g. The text of a label. The control will resize to the CellWidth of the cell |
ContentWidth | The CellWidth will be governed by the contents of the control e.g. The text of a label. The CellHeight will remain unchanged |
ContentWidthAndHeight | The CellWidth and CellHeight will be governed by the contents of the control e.g The text of a label |
ContentWidthFitToHeight | The CellWidth will be governed by the contents of the control e.g. The text of a label. The control will resize to the CellHeight of the cell |
FitBoth | The content will fill the cell completely |
FitToHeight | The content will be as tall as the cell. The CellWidth property will govern the width |
FitToWidth | The content will be as wide as the cell. The CellHeight property will govern the height |
None | Content height and width will be governed by the CellHeight and CellWidth properties |
In this example, the buttons are aligned to the centerleft with a slight indent.
Begin_Com Role(*EXTENDS #PRIM_WEB) Define_Com Class(#PRIM_LIST) Name(#List1) Displayposition(1) Left(24) Parent(#COM_OWNER) Tabposition(1) Top(24) Height(417) Width(625) Rowheight(29) Define_Com Class(#PRIM_LIST.Button) Name(#ColumnButton1) Columnwidth(128) Displayposition(1) Parent(#List1) Cellsizing(None) Cellwidth(80) Cellalignment(CenterLeft) Cellmarginleft(3) Evtroutine Handling(#Com_owner.CreateInstance) Begin_Loop To(10) Add_Entry To_List(#List1) #ColumnButton1.CurrentItem.Caption := #List1.Items.ItemCount.Asstring End_Loop Endroutine End_Com
Febuary 18 V14SP2