6 15 6 Defining a List Type Component

Visual LANSA

6.15.6 Defining a List-Type Component

You use repository fields to specify what data is to be displayed in the list. To define what fields the list is to contain, drag them from the repository to the list.

As you can see, every field you drag to the list becomes a column in the list. By default the columns are named xxCL_n, for example GDCL_1 for the first grid column. You can see the column definition in the Source view of the editor and you can view the column's properties in the Details tab. Note that the column definition shows the list to which it belongs (#Grid_1 in the next picture) and the field from which it is sourced (#SKILCODE).

This is a five-column grid:

Its definition is created automatically as the fields are dragged to the grid:

DEFINE_COM class(#PRIM_GRID) name(#GRID_1) COLUMNBUTTONHEIGHT(21) DISPLAYPOSITION(1) HEIGHT(113) LEFT(24) PARENT(#COM_OWNER) SHOWBUTTONSELECTION(True) SHOWSELECTION(True) SHOWSELECTIONHILIGHT(False) SHOWSORTARROW(True) TABPOSITION(1) TOP(16) WIDTH(625)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_1) CAPTIONALIGN(Left) DISPLAYPOSITION(1) PARENT(#GRID_1) SOURCE(#SKILCODE) WIDTH(11)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_2) CAPTIONALIGN(Left) DISPLAYPOSITION(2) PARENT(#GRID_1) SOURCE(#SKILDESC) WIDTH(20)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_3) CAPTIONALIGN(Left) DISPLAYPOSITION(3) PARENT(#GRID_1) SOURCE(#DATEACQR) WIDTH(25)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_4) CAPTIONALIGN(Left) DISPLAYPOSITION(4) PARENT(#GRID_1) SOURCE(#GRADE) WIDTH(19)
DEFINE_COM class(#PRIM_GDCL) name(#GDCL_5) CAPTIONALIGN(Left) DISPLAYPOSITION(5) PARENT(#GRID_1) SOURCE(#COMMENT) WIDTH(20) WIDTHTYPE(Remainder)

 

Hidden Columns

Specifying the Column Width

Sorting the Lists

Ý 6.15 Lists, Tree Views, Grids and Graphs