When I len() to check Length of variable and it show 3 but I cannot type anything.
If I clear the text and type again;
English : can type up to 3 charactors
Thai : can type 1 charactor (I think TGET understand that is 3 bytes already, because of Unicode text)
- Code: Select all Expand view
- #include "FiveWin.ch"
function Main()
LOCAL oDlg, oGet
LOCAL cCad := "ทด " // pad("Testing Gets",40)
LOCAL nNum := 0
LOCAL dDat := Date()
Set century On
Set Date Ansi
Set Date format "mm/dd/yyyy"
SET _3DLOOK ON
FW_SetUnicode(.T.)
?len(cCad)
DEFINE DIALOG oDlg TITLE "TGet from " + FWDESCRIPTION
@ 1, 2 SAY "Text..:" OF oDlg
@ 1, 6 GET oGet VAR cCad OF oDlg SIZE 60, 10 COLOR "W/G"
@ 1.8, 2 SAY "Number:" OF oDlg
@ 2, 6 GET oGet VAR nNum OF oDlg SIZE 60, 10 PICTURE "9999999.99"
@ 2.6, 2 SAY "Date:" OF oDlg
@ 3, 6 GET oGet VAR dDat PICTURE "@E" OF oDlg SIZE 60, 10 // "@D"
@ 3, 7 BUTTON "&Ok" OF oDlg SIZE 30, 12 ACTION oDlg:End()
@ 3, 16 BUTTON "&Cancel" SIZE 30, 12 OF oDlg ACTION oDlg:End() CANCEL
// TGet():SetColorFocus( nRGB( 200, 120, 120 ) )
ACTIVATE DIALOG oDlg CENTERED
return nil
//------------------------------------------------------------------------//
procedure appsys // XBase++ requirement
return