We advise you to use Edit control, which is very similar to Get control. Edit control allows input of variable length.
- Code: Select all Expand view
cVar2 := ""
@ 60,20 EDIT oEdit VAR cVar2 SIZE 200,20 PIXEL OF oDlg
In case of Unicode applications, (when FW_SetUnicode( .t. )), we can use Get control also with the clause "VARCHAR n"
- Code: Select all Expand view
local oDlg, oGet, oEdit
local cVar1 := ""
local cVar2 := ""
FW_SetUnicode( .F. )
DEFINE DIALOG oDlg SIZE 300,300 PIXEL TRUEPIXEL
@ 20,20 GET oGet VAR cVar1 SIZE 200,20 PIXEL OF oDlg ;
VARCHAR 20
@ 60,20 EDIT oEdit VAR cVar2 SIZE 200,20 PIXEL OF oDlg
@ 100,20 BUTTON "CHECK" SIZE 100,40 PIXEL OF oDlg ;
ACTION MsgInfo( "|" + cVar1 + "|" + CRLF + "|" + cVar2 + "|" )
ACTIVATE DIALOG oDlg CENTERED
For ANSI applications, it is a good idea to use EDIT control