3 6 5 Using a Field with Visualization

Visual LANSA

3.6.5 Using a Field with Visualization

When you add a field to a component, its default visualization is displayed.

Here is the #SIZE field which is a List on a form at design-time:

This is its definition on the form:

Define_Com Class(#SIZE.Visual) Name(#SIZE) Displayposition(1) Left(32) Parent(#COM_OWNER) Tabposition(1) Top(16)

 

With a Field with Several Visualizations you can use a visualization which is not the default by specifying the name of the visualization like this:

 

#FieldName.VisualizationName

 

For example this form contains three visualizations fora field:

Here are the component definitions on the form:

DEFINE_COM CLASS(#SampleAlpha.VisualEdit) NAME(#SampleAlpha) DISPLAYPOSITION(1) LEFT(16) PARENT(#COM_OWNER) TABPOSITION(1) TOP(8)

 

DEFINE_COM CLASS(#SampleAlpha.VisualMultilineEdit) NAME(#EDIT) DISPLAYPOSITION(2) LEFT(24) MARGINLEFT(150) PARENT(#COM_OWNER) TABPOSITION(2) TOP(88) WIDTH(289)

 

DEFINE_COM CLASS(#SampleAlpha.VisualPicklist) NAME(#RADIO) DISPLAYPOSITION(3) HEIGHT(40) LEFT(24) MARGINLEFT(50) PARENT(#COM_OWNER) TABPOSITION(3) TOP(40) WIDTH(145)

 

The DropDownList which is the default visualization is simply defined as #SIZE.Visual whereas the other visualizations are specified by name.

Ý 3.6 Field Visualization Development