6 20 5 User Designed Controls

Visual LANSA

6.20.5 User-Designed Controls

A user-defined control is a special kind of reusable part for displaying list-type information. It offers more flexibility to the designer than predefined controls such as the tree view or list view controls.

User-designed controls can only be used with applications which are run in DirectX mode.

The Visual LANSA user-designed controls are:

  • Carousel (prim_caro)
  • Tile (prim_tile)
  • Tree (prim_tree)
  • Book (prim_book)

To see examples of the user-designed controls run the DirectX demonstration application (it is launched from the Partition Initialization dialog):

User-designed controls behave just like the other list controls, and obey the same list processing rules as tree view, list view and grid. For example they can be manipulated using the typical list commands such as Add_Entry and Upd_Entry, and respond to focus, selection, MouseOver and all the other typical events associated with visual list controls.

However, they have no defined appearance, in other words their design is user-designed.

For a predefined list view (Prim_ltvw) control, the definition in the source might appear as follows, with columns defined to indicate the data being used:

Define_Com Class(#PRIM_LTVW) Name(#LTVW_1) Columnbuttonheight(19) Componentversion(2) Displayposition(1) Fullrowselect(True) Height(342) Keyboardpositioning(SortColumn) Left(9) Parent(#COM_OWNER) Showsortarrow(True) Tabposition(1) Top(11) Width(680)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_1) Displayposition(1) Parent(#LTVW_1) Source(#EMPNO)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_2) Displayposition(2) Parent(#LTVW_1) Source(#SURNAME) Width(27)
Define_Com Class(#PRIM_LVCL) Name(#LVCL_3) Displayposition(3) Parent(#LTVW_1) Source(#GIVENAME) Width(32)
 

For a user-designed Tile (prim_tile) the definition might be like this:

Define_Com Class(#prim_Tile<#XDXTileDesign>) Name(#Tile) Displayposition(1) Height(359) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(30) Width(686)

 

Rather than columns, the tile simply has a design, in this case #XDXTileDesign.  This defines the appearance of the item and any field values that will be made available to each item.

See Designs.