FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour How to insert a TAB in TMultiGet using the keyboard
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
How to insert a TAB in TMultiGet using the keyboard
Posted: Mon Jan 04, 2010 09: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

Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
Re: How to insert a TAB in TMultiGet using the keyboard
Posted: 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

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to insert a TAB in TMultiGet using the keyboard
Posted: Tue Jan 05, 2010 12:44 AM

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

EMG

Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: How to insert a TAB in TMultiGet using the keyboard
Posted: Tue Jan 05, 2010 07: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
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: How to insert a TAB in TMultiGet using the keyboard
Posted: 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

Continue the discussion