How to insert a TAB in TMultiGet using the keyboard

How to insert a TAB in TMultiGet using the keyboard

Postby Enrico Maria Giordano » Mon Jan 04, 2010 9:11 pm

Dear friends, is there an easy way to insert a TAB character (CHR( 9 )) in a TMultiGet object using the keyboard? ALT-9 doesn't seem to work.

Thanks in advance.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8337
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to insert a TAB in TMultiGet using the keyboard

Postby James Bott » Tue Jan 05, 2010 12:00 am

Enrico,

This is from my notes.

-------------------------
To allow the Tab key in memo gets add this to keyDown method:

// add next two lines
case nKey == VK_TAB
return 0

Normally the Tab just goes to the next field.
-------------------------

However, it doesn't seem like a very good solution since you have to modify FW source.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: How to insert a TAB in TMultiGet using the keyboard

Postby Enrico Maria Giordano » Tue Jan 05, 2010 12:44 am

Thank you. I will wait for a solution that don't require to change FWH sources.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8337
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: How to insert a TAB in TMultiGet using the keyboard

Postby Antonio Linares » Tue Jan 05, 2010 7:30 am

Enrico,

Please be ware that if you want to insert Tabs then you will not able to use Tab to give focus to the next control.

I would try it this way:
oMemo:nDlgCode = DLGC_WANTALLKEYS
regards, saludos

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

Re: How to insert a TAB in TMultiGet using the keyboard

Postby Enrico Maria Giordano » Tue Jan 05, 2010 10:58 am

For the moment I'm using this:

Method KeyChar()

if nKey == 63 .and. nAnd( nFlags / 65536, 255 ) == 57
::Replace( CHR( 9 ) )
if ::bChange != nil
Eval( ::bChange, nKey, nFlags, Self )
endif
return 0
endif

It allows me to use ALT-9 to insert a TAB. The TAB key on the keyboard is untouched.

Do you think it is a good solution for the standard TMultiGet?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8337
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

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