ImageAndText

Visual LANSA

ImageAndText

Field Name

NATION (Alpha 3)

How to visualize a field as an Image set on a form.

This Visualization type is useful to provide a more visual means of selecting values from a list.

Through the Field Component source add a Picklist visualization ( PRIM_EVPL ) and a Picklist. Note that these are separate classes in the Field source. Add picklist items to represent nationalities and attach an image to each picklist item.Change the Appearance property of the PRIM_EVPL to ImageAndText. Save the field and use the VisualPicklist class on a form.

Field Source

Begin_Com Role(*EXTENDS #PRIM_OBJT)

 
Begin_Com Role(*picklist) Name(#Picklist)
 
Define_Com Class(#PRIM_PKIT) Name(#Item_1) Caption('USA') Default(True) Image(#VL_FLGUSA) Parent(#Picklist) Value('USA')
Define_Com Class(#PRIM_PKIT) Name(#Item_2) Caption('Japan') Image(#VL_FLGJPN) Parent(#Picklist) Value('JPN')
 
Define_Com Class(#PRIM_PKIT) Name(#Item) Caption('Great Britain') Image(#VL_FLGGB) Parent(#Picklist) Value('GBP')
Define_Com Class(#PRIM_PKIT) Name(#Item_3) Caption('Australia') Image(#VL_FLGAUS) Parent(#Picklist) Value('AUS')
End_Com
 
Begin_Com Role(*Visual #PRIM_EVPL) Name(#VisualPicklist) Appearance(ImageAndText) Defaultvisual(True) Height(95) Width(209)
 
End_Com
 
End_Com

 

Form Source

Function Options(*DIRECT)

 
Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(130) Clientwidth(492) Height(157) Left(304) Top(155)
 
Define_Com Class(#NATION.VisualPickList) Name(#NATION) Displayposition(1) Height(89) Left(160) Marginleft(60) Parent(#COM_OWNER) Tabposition(1) Top(16) Width(129)
 
End_Com
  

Appearance

Ý 3.6.9 Form Samples