Change TabStop Property after Definition

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

Post Reply
User avatar
raumi75
Posts: 135
Joined: Wed Dec 17, 2008 2:31 am
Location: Lünen, Germany
Contact:

Change TabStop Property after Definition

Post by raumi75 »

Hello everyone,

I have a question about HMG3 and controls like the textbox. The Tabstop Property is only available at definition time, but I need to change it during runtime.

Does anyone have an elegant workaround for this restriction?

Thanks a lot!
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Change TabStop Property after Definition

Post by Rathinagiri »

You can setfocus to the next control on thiscontrol's ongotfocus event after checking the required condition.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
User avatar
gfilatov
Posts: 1068
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Change TabStop Property after Definition

Post by gfilatov »

raumi75 wrote:Hello everyone,

I have a question about HMG3 and controls like the textbox. The Tabstop Property is only available at definition time, but I need to change it during runtime.

Does anyone have an elegant workaround for this restriction?

Thanks a lot!
Hello Raumi,

Did you tried

SetTabStop(GetControlHandle( 'Text_1' , 'Form_1' ), .f.)

:?:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein
User avatar
raumi75
Posts: 135
Joined: Wed Dec 17, 2008 2:31 am
Location: Lünen, Germany
Contact:

Re: Change TabStop Property after Definition

Post by raumi75 »

gfilatov wrote: SetTabStop(GetControlHandle( 'Text_1' , 'Form_1' ), .f.)
Thank you very much. That was exactly what I was looking for!! :D
User avatar
raumi75
Posts: 135
Joined: Wed Dec 17, 2008 2:31 am
Location: Lünen, Germany
Contact:

Re: Change TabStop Property after Definition

Post by raumi75 »

raumi75 wrote:
gfilatov wrote: SetTabStop(GetControlHandle( 'Text_1' , 'Form_1' ), .f.)
I just learned, that I need to check the status first and only set the value if necessary, otherwise, the control starts looking and behaving strangely (for reasons I do not understand).

Code: Select all

if isTabStop(GetControlHandle( 'Text_1' , 'Form_1' ) )
   SetTabStop(GetControlHandle( 'Text_1' , 'Form_1' ), .f.) 
endif
User avatar
Rathinagiri
Posts: 5471
Joined: Tue Jul 29, 2008 6:30 pm
DBs Used: MariaDB, SQLite, SQLCipher and MySQL
Location: Sivakasi, India
Contact:

Re: Change TabStop Property after Definition

Post by Rathinagiri »

New to me. Thanks a lot for the info.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
Post Reply