Spin Edit

Visual LANSA

Spin Edit

Field Name

STD_NUM

Description

Display the field STD_NUM in a grid and have the grid editable as a SpinEdit.

Create a grid component. From the fields tab add the STD_NUM field to the grid as a column. Set the ReadOnly property of the created column to FALSE and the EditAppearance property to SpinEdit. Load the grid and the column can be edited as a spin edit

Field Source

Begin_Com Role(*EXTENDS #PRIM_OBJT)

 
Begin_Com Role(*Visual #PRIM_EVEF) Name(#VisualEdit) Height(19) Usepicklist(False) Width(262)
 
End_Com
 
End_Com

 

Form Source

Function Options(*DIRECT)

 

Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(147) Clientwidth(492) Height(174) Left(369) Top(152)
 
Define_Com Class(#PRIM_GRID) Name(#GRID) Captionnoblanklines(True) Componentversion(1) Displayposition(1) Height(128) Left(41) Parent(#COM_OWNER) Showbuttonselection(True) Showselection(True) Showselectionhilight(False) Showsortarrow(True) Tabposition(1) Top(9) Width(344)
Define_Com Class(#PRIM_GDCL) Name(#GDCL) Displayposition(1) Editappearance(SpinEdit) Parent(#GRID) Readonly(False) Source(#STD_NUM) Width(30)
 
Evtroutine Handling(#COM_OWNER.CreateInstance) Options(*NOCLEARMESSAGES *NOCLEARERRORS)
 
Select Fields(#SECTION) From_File(PSLMST)
 
Add_Entry To_List(#GRID)
 
Endselect
 
Endroutine
 
End_Com

 

Appearance

Note:

It is not necessary to have a PRIM_EVSE (SpinEdit) visualization in the Field component source in order to edit the field in a grid as a spin edit. It is through the Grid column properties rather than the field component source that the spin edit visualization is used.

Ý 3.6.10 List Samples