Base class for all columns
Ancestors - Object (PRIM_OBJT)
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.
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
Name | Description |
---|---|
CellAlignment | Position of the content of a list cell. |
CellHeight | Height of the cell in pixels when not overridden by CellSizing |
CellMarginBottom | Bottom margin of the cell in pixels when not overridden by CellSizing |
CellMarginLeft | Left margin of the cell in pixels when not overridden by CellSizing |
CellMarginRight | Right margin of the cell in pixels when not overridden by CellSizing |
CellMarginTop | Top margin of the cell in pixels when not overridden by CellSizing |
CellSizing | Sizing behavior of a list cell allowing for the content to only use a portion of the cell |
CellWidth | Width of the cell in pixels when not overridden by CellSizing |
ColumnCaption | Caption displayed in the column header |
ColumnCaptionAlign | Alignment of the text in the column header |
ColumnCaptionText | Caption displayed in the column header |
ColumnCaptionWordWrap | Wrap text on to the next line if there is insufficient space |
ColumnImage | Image to be show in the column heading |
ColumnImageHeight | Set the height and width of the column image in pixels |
ColumnMaxWidth | Maximum allow width of the column in pixels |
ColumnMinWidth | Minimum allow width of the column in pixels |
ColumnMouseOverStyle | Style to be applied to the column header on mouseOver |
ColumnMouseOverStyles | Collection of styles to be applied to the column header on mouseOver |
ColumnPinned | Pin the column to the left or right hand sides of the list |
ColumnPopup | Popup Panel to display as a menu |
ColumnPopupImage | Image to display in the column header in place of the default image |
ColumnPressedStyle | Style to be applied to the column header on click |
ColumnPressedStyles | Collection of styles to be applied to the column header on mouseOver |
ColumnResize | Specifies whether the column can be manually resized |
ColumnStyle | Style to be applied to the column |
ColumnStyles | Collection of styles to be applied to the column |
ColumnThemeDrawStyle | Name of the Theme DrawStyle to be applied to the column heading |
ColumnUnits | Specifies whether the column is a specific width or uses a proportion of the available space (See ColumnWidth) |
ColumnVisible | Show or hide the column |
ColumnWidth | Width of the column. See the ColumnUnits property |
ComponentClassName | ComponentClassName is the name of the component's class. Inherited from Object (PRIM_OBJT) |
ComponentMembers | ComponentMembers provides access to all the member components of this component Inherited from Object (PRIM_OBJT) |
ComponentPatternName | ComponentPatternName is used to qualify the class of the component. Inherited from Object (PRIM_OBJT) |
ComponentTag | Generic space allowing a value to be stored for the instance Inherited from Object (PRIM_OBJT) |
ComponentType | ComponentType gives you access to the type information about the component Inherited from Object (PRIM_OBJT) |
ComponentTypeName | ComponentTypeName is the fully qualified name of the component's class. Inherited from Object (PRIM_OBJT) |
CurrentItem | The last item in the column touched either in the UI or via a list related command |
DisplayPosition | Position of the column relative to the other columns |
Enabled | Enable or disable the column contents |
FocusItem | Reference to the focus item in the column |
Name | Name identifies the component Inherited from Object (PRIM_OBJT) |
Owner | Owner owns this component Inherited from Object (PRIM_OBJT) |
Parent | Reference to the list containing the column |
SortAsColumn | Specifies an alternate column to use to sort the data |
SortDirection | Sort the column ascending or descending |
SortPosition | Position of the column in the sort sequence |
Style | Styles to be applied to the item |
Styles | Collection of styles to be applied to the item |
ThemeDrawStyle | ThemeDrawStyle to be applied to the column |
Visible | Show or hide the content of a cell |
Name | Description |
---|---|
ColumnClick | Fired when the column header is clicked
Origin, Handled |
ColumnDoubleClick | Fired when the column header is DoubleClicked
Origin, Handled |
ColumnMouseEnter | Fired when the mouse enters the bounds of the column |
ColumnMouseLeave | Fired when the mouse leaves the bounds of the column |
CreateInstance | CreateInstance is signalled when an instance of a component is created Inherited from List Column (PRIM_LIST.Column) |
DestroyInstance | DestroyInstance is signalled when an instance of a component is about to be destroyed Inherited from List Column (PRIM_LIST.Column) |
Name | Description |
---|---|
SizeToContents | Set the column width to the widest content |
LANSA Version 15, April 2020