As we know, picture clause "@!" forces data entry to upper case. Instead, we can also use "CASE UPPER" clause. Or we can use CASE LOWER or CASE PROPER to force Lower or Proper case.
This clause applies to ANSI character gets created from source. If picture clause specified contains "!", the picture clause takes precedence and this clause is ignored.
The following sample demostrates use of CASE UPPER,LOWER and PROPER.
- Code: Select all Expand view
#include "fivewin.Ch"
//------------------------------------------------------------------//
function Main()
local oDlg, oFont
local aData := { space( 40 ), space( 40 ), space( 40 ) }
local aGet[ 3 ]
SetGetColorFocus()
DEFINE FONT oFont NAME "Segoe UI Semibold" SIZE 0,-16
DEFINE DIALOG oDlg SIZE 540,250 PIXEL TRUEPIXEL FONT oFont ;
TITLE FWVERSION + " : GET Upper,Lower,Proper Cases"
@ 30,30 SAY " Upper Case :" WIDTH 100 GET aGet[ 1 ] VAR aData[ 1 ] SIZE 450,32 PIXEL OF oDlg CASE UPPER
@ 65,30 SAY " Lower Case :" WIDTH 100 GET aGet[ 2 ] VAR aData[ 2 ] SIZE 450,32 PIXEL OF oDlg CASE LOWER
@ 100,30 SAY " Proper Case :" WIDTH 100 GET aGet[ 3 ] VAR aData[ 3 ] SIZE 450,32 PIXEL OF oDlg CASE PROPER
@ 170,30 BTNBMP PROMPT "Show Vars" SIZE 200,40 PIXEL OF oDlg FLAT ACTION ( msginfo( FW_ArrayAsList( aData,,.t. ) ) )
ACTIVATE DIALOG oDlg CENTERED
RELEASE FONT oFont
return nil
//------------------------------------------------------------------//