I have made a modification in both TGET.PRG for FW and FWH.
Now greek users can use this clause
REDEFINE GET oget VAR cGet Picture "@g" ID 1001 OF oDlg
etc.
The old picture "@!", still works, but only for upper case english characters,
in the "@g" picture, it converts both english and greek characters to upper
case.
I hereby paste the code changed in TGET.PRG (it works for both 16 bit and 32 bit)
You'd need to include TGET.PRG in your programs, but have to modify
the METHOD KeyChar( nKey, nFlags ) CLASS TGet as follows:
- Code: Select all Expand view RUN
METHOD KeyChar( nKey, nFlags ) CLASS TGet
local nHi, nLo
local lAccept
local bKeyAction := SetKey( nKey )
local nDefButton
local n, xKey // added this local variable 11/sep/2006 V.
if ! Empty( ::cPicture ) .and. '@!' $ ::cPicture
xKey := Chr(nKey)
if xKey $ "abcdefghijklmnopqrstuvwxyz" // added this if - endif 11/sep/2006 V.
xKey := Upper( xKey )
nKey := Asc(xKey)
endif xKey $ "abcdefghijklmnopqrstuvwxyz" // added this if - endif 11/sep/2006 V.
endif
if ! Empty( ::cPicture ) .and. Upper('@g') $ Upper(::cPicture)
* Translate to upper case - English characters first!
xKey := Chr(nKey)
if xKey $ "abcdefghijklmnopqrstuvwxyz" // added this if - endif 11/sep/2006 V.
xKey := Upper( xKey )
nKey := Asc(xKey)
endif xKey $ "abcdefghijklmnopqrstuvwxyz" // added this if - endif 11/sep/2006 V.
* Translate to upper case - Greek characters now!
xKey := Chr(nKey)
if xKey $ "αάβγδεέζηήθιίϊκλμνξοόπρσςτυύϋφχψωώ" // added this if - endif 11/sep/2006 V.
n := At(xKey, "αάβγδεέζηήθιίϊκλμνξοόπρσςτυύϋφχψωώ")
xKey := Subs("ΑΆΒΓΔΕΈΖΗΉΘΙΊΪΚΛΜΝΞΟΌΠΡΣΣΤΥΎΫΦΧΨΩΏ", n, 1)
nKey := Asc(xKey)
endif xKey $ "αάβγδεέζηήθιίϊκλμνξοόπρσςτυύϋφχψωώ" // added this if - endif 11/sep/2006 V.
endif
if bKeyAction != nil .and. lAnd( nFlags, 16777216 ) // function Key
Eval( bKeyAction, ProcName( 4 ), ProcLine( 4 ), Self )
return 0 // Already processed, API do nothing
endif
1. The code from if bKeyAction..... and below remains unchanged
2. If someone wants the code exactly as it should be, I can submit my own TGET.PRG's (16 bit and 32 bits)
I believe that this is a better solution than the function GR_UPPER() above.
Kind regards to all
Evans