Page 1 of 1

GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sat Apr 23, 2016 12:46 pm
by Horizon
Hi,

There is no option PICTURE in TMultiGet. How can i simulate it like PICTURE "@!"?

Thanks,

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sat Apr 23, 2016 12:54 pm
by nageswaragunupudi
In the New() method you need to add ES_UPPERCASE to the Style

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sat Apr 23, 2016 1:04 pm
by Horizon
Hi Mr. Nages,

You mean change the TMultiget class source and compile it with my application.

Is there any method to set it changing source?

Thanks,

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sat Apr 23, 2016 3:13 pm
by nageswaragunupudi
If you create the Get from resources, you can add ES_UPPERCASE while creating the resource.
If you create the Get from source code

Add this code after creating the Get
Code: Select all  Expand view
  if Empty( oGet:hWnd )
      oGet:nStyle := nOr( oGet:nStyle, ES_UPPERCASE )
   else
      oGet:WinStyle( ES_UPPERCASE, .t. )
   endif
 


Note: Value of ES_UPPERCASE is 8

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sat Apr 23, 2016 4:21 pm
by Horizon
Thank you Mr. Nages,

It works but there is also problem like TGet class.

http://forums.fivetechsupport.com/viewtopic.php?f=3&t=32326

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sun Apr 24, 2016 9:36 am
by Horizon
Hi,

I think it should an addition to KeyChar Method like TGet class.

Code: Select all  Expand view
  if ! Empty( ::cPicture ) .and. '@!' $ ::cPicture
      nKey = Asc(Upper(Chr(nKey)))
   endif


But I dont know how to determine ES_UPPERCASE have in ::Style variable.

Thanks,

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sun Apr 24, 2016 9:58 am
by nageswaragunupudi
If we use ES_UPPERCASE style, the conversion to upper case is done by Windows. The key that the Get object receives itself is the converted key. Windows conversion depends on the language set on the PC.

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sun Apr 24, 2016 9:59 am
by Horizon
Hi,

I found. :)

KeyChar Method In mGet.prg.

Code: Select all  Expand view
  local lAccept

   if ::WinStyle( ES_UPPERCASE )            // Horizon 24.04.2016 12:53:50
      nKey = Asc(Upper(Chr(nKey)))
   endif
   
   if bKeyAction != nil .and. lAnd( nFlags, 16777216 ) // function Key


and

define section.
Code: Select all  Expand view
#define ES_UPPERCASE 8


It is working good now.

or alternatif solution.

It can be add a UPPERCASE option in MULTIGET ch command description.

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

PostPosted: Sun Apr 24, 2016 10:27 am
by Antonio Linares
Hakan,

very good

Implemented for next FWH version