ButtonSet

Visual LANSA

ButtonSet

Field Name

SEX (Alpha 1)

Description

How to visualize a field as a set of radio buttons on a form.

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 PicklistItems for male and Female to the Picklist and ensure the Appearance property of the PRIM_EVPL is ButtonSet. Save the field and use the VisualPicklist class on a form.

Field Source

Begin_Com Role(*EXTENDS #PRIM_OBJT)

 
Begin_Com Role(*Visual #PRIM_EVEF) Name(#VisualEdit) Defaultvisual(True) Height(19) Usepicklist(False) Width(178)
 
End_Com
 
Begin_Com Role(*picklist) Name(#LIST)
Define_Com Class(#PRIM_PKIT) Name(#ITEM1) Caption('Male') Default(True) Parent(#LIST) Value('M')
Define_Com Class(#PRIM_PKIT) Name(#ITEM2) Caption('Female') Parent(#LIST) Value('F')
End_Com
 
Begin_Com Role(*Visual #PRIM_EVPL) Name(#VisualPicklist) Height(69) 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(#SEX.VisualPickList) Name(#SEX) Displayposition(1) Height(25) Left(56) Marginleft(233) Parent(#COM_OWNER) Tabposition(1) Top(32) Width(370)
 
End_Com

 

Appearance

Ý 3.6.9 Form Samples