List Column (PRIM_LIST.Column)
Base class for all columns
Ancestors - Object (PRIM_OBJT)
Details
Column is the base class for all column type in the List control.
Unlike other component LANSA lists e.g. Tree and Grid, where column types are generic, Prim_List has specific column types for string, number, date time, image, button, check box and reusable part.
When a field or control is dropped on the list, the appropriate type of column is added. If it was a field, the source parameter of the column will be set as it is for other LANSA lists.
Columns work in 2 ways. Firstly, the definition of the column is used as a prototype when an entry is added. So, a button column defined with a caption of "Delete" will show a button in each item with a caption of "Delete". Secondly, all column types have a CurrentItem property that provides access to the individual instance.
Example
This example shows a simple list with a number and button columns. The button is hidden if the row is an even numbered row.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(456) Width(864) 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(#List1Item1) Column(#Column1) Manage(#List) Parent(#TableLayout1) Row(#Row1)
Define_Com Class(#PRIM_LIST) Name(#List) Displayposition(1) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(0) Height(456) Width(864) Rowheight(33)
Define_Com Class(#PRIM_LIST.Number) Name(#ColumnXDEMONUMB1) Displayposition(1) Increment(1) Parent(#List) Source(#xDemoNumber) Wrap(False)
Define_Com Class(#PRIM_LIST.Button) Name(#ColumnButton1) Columnwidth(100) Displayposition(2) Parent(#List) Caption('Delete') Cellsizing(None) Cellwidth(80)
Evtroutine Handling(#Com_Owner.CreateInstance)
Begin_Loop Using(#xDemoNumber) To(10)
Add_Entry To_List(#List)
#ColumnButton1.CurrentItem.Visible := (#xDemoNumber.mod( 2 ) = 0)
End_Loop
Endroutine
Evtroutine Handling(#ColumnButton1.Click)
Dlt_Entry Number(#List.CurrentItem.Entry)
Endroutine
End_Com
Properties
Name | Description |
|---|---|
Position of the content of a list cell. | |
Height of the cell in pixels when not overridden by CellSizing | |
Bottom margin of the cell in pixels when not overridden by CellSizing | |
Left margin of the cell in pixels when not overridden by CellSizing | |
Right margin of the cell in pixels when not overridden by CellSizing | |
Top margin of the cell in pixels when not overridden by CellSizing | |
Sizing behavior of a list cell allowing for the content to only use a portion of the cell | |
Width of the cell in pixels when not overridden by CellSizing | |
Caption displayed in the column header | |
Alignment of the text in the column header | |
Caption displayed in the column header | |
Wrap text on to the next line if there is insufficient space | |
Image to be show in the column heading | |
Set the height and width of the column image in pixels | |
Maximum allow width of the column in pixels | |
Minimum allow width of the column in pixels | |
Style to be applied to the column header on mouseOver | |
Collection of styles to be applied to the column header on mouseOver | |
Pin the column to the left or right hand sides of the list | |
Popup Panel to display as a menu | |
Image to display in the column header in place of the default image | |
Style to be applied to the column header on click | |
Collection of styles to be applied to the column header on mouseOver | |
Specifies whether the column can be manually resized | |
Style to be applied to the column | |
Collection of styles to be applied to the column | |
Name of the Theme DrawStyle to be applied to the column heading | |
Specifies whether the column is a specific width or uses a proportion of the available space (See ColumnWidth) | |
Show or hide the column | |
Width of the column. See the ColumnUnits property | |
ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT) | |
ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT) | |
ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT) | |
Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT) | |
ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT) | |
ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT) | |
The last item in the column touched either in the UI or via a list related command | |
Position of the column relative to the other columns | |
Enable or disable the column contents | |
Reference to the focus item in the column | |
Name identifies the component Inherited from Object (PRIM_OBJT) | |
Owner owns this component Inherited from Object (PRIM_OBJT) | |
Reference to the list containing the column | |
Specifies an alternate column to use to sort the data | |
Sort the column ascending or descending | |
Position of the column in the sort sequence | |
Styles to be applied to the item | |
Collection of styles to be applied to the item | |
ThemeDrawStyle to be applied to the column | |
Show or hide the content of a cell |
Events
Name | Description |
|---|---|
Fired when the column header is clicked Origin, Handled | |
Fired when the column header is DoubleClicked Origin, Handled | |
Fired when the mouse enters the bounds of the column | |
Fired when the mouse leaves the bounds of the column | |
CreateInstance is signaled when an instance of a component is created (Inherited from List Column (PRIM_LIST.Column) | |
DestroyInstance is signaled when an instance of a component is about to be destroyed (Inherited from List Column (PRIM_LIST.Column) |
Methods
Name | Description |
|---|---|
Set the column width to the widest content |