Page 1 of 1

Change TabStop Property after Definition

Posted: Wed Jan 11, 2012 11:20 am
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!

Re: Change TabStop Property after Definition

Posted: Wed Jan 11, 2012 12:15 pm
by Rathinagiri
You can setfocus to the next control on thiscontrol's ongotfocus event after checking the required condition.

Re: Change TabStop Property after Definition

Posted: Wed Jan 11, 2012 12:28 pm
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.)

:?:

Re: Change TabStop Property after Definition

Posted: Wed Jan 11, 2012 1:09 pm
by raumi75
gfilatov wrote: SetTabStop(GetControlHandle( 'Text_1' , 'Form_1' ), .f.)
Thank you very much. That was exactly what I was looking for!! :D

Re: Change TabStop Property after Definition

Posted: Wed Jan 11, 2012 3:43 pm
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

Re: Change TabStop Property after Definition

Posted: Wed Jan 11, 2012 6:03 pm
by Rathinagiri
New to me. Thanks a lot for the info.