3 6 6 Using Field Visualization in a List

Visual LANSA

3.6.6 Using Field Visualization in a List

Using a Field Visualization in a list is relatively complex as it requires a greater understanding of the parts available for visualizing fields in different ways.

On a form you have a direct one to one relation ship between a field class and that field class visualized on a form. This is not true for Field Visualization in a LANSA List component. Grid, ListView and TreeView all support Field Visualization capabilities. These components work by adding columns to the List component. So where on a form we use the FieldName.ClassName standard for accessing visualizations in a List Component we use the Source property of the column and then manipulate various properties of the column.

Basic Example

Create a Form and add a Grid with 1 column for #STD_NUM.

Change the DisplayAppearance and EditAppearance properties of the column to reflect the visualization required. Eg.For column sourced to #STD_NUM change the EditAppearance property to SpinEdit. Also ensure ReadOnly property is FALSE for Column.

Define_Com Class(#PRIM_GDCL) Name(#GDCL_1) Displayposition(1) Editappearance(SpinEdit) Parent(#GRID_2) Readonly(False) Source(#STD_NUM) Width(48)

 

Populate the grid from the form's CreateInstance event.

Define_Com Class(#STD_NUM.VisualSpinEdit) Name(#STD_NUM) Displayposition(1) Left(96) Parent(#COM_OWNER) Tabposition(1) Top(32)

 

Compile and run the form. Column is edited as a SpinEdit.