GET (MEMO, MULTILINE, TEXT) UpperCase

GET (MEMO, MULTILINE, TEXT) UpperCase

Postby Horizon » Sat Apr 23, 2016 12:46 pm

Hi,

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

Thanks,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

Postby nageswaragunupudi » Sat Apr 23, 2016 12:54 pm

In the New() method you need to add ES_UPPERCASE to the Style
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

Postby Horizon » Sat Apr 23, 2016 1:04 pm

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,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

Postby nageswaragunupudi » Sat Apr 23, 2016 3:13 pm

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
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

Postby Horizon » Sat Apr 23, 2016 4:21 pm

Thank you Mr. Nages,

It works but there is also problem like TGet class.

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

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

Postby Horizon » Sun Apr 24, 2016 9:36 am

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,
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

Postby nageswaragunupudi » Sun Apr 24, 2016 9:58 am

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.
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

Postby Horizon » Sun Apr 24, 2016 9:59 am

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.
Regards,

Hakan ONEMLI

Harbour & MSVC 2022 & FWH 23.04
Horizon
 
Posts: 1322
Joined: Fri May 23, 2008 1:33 pm

Re: GET (MEMO, MULTILINE, TEXT) UpperCase

Postby Antonio Linares » Sun Apr 24, 2016 10:27 am

Hakan,

very good

Implemented for next FWH version
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42063
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 70 guests