Xojo Conferences
XDCMay2019MiamiUSA

Automatically Moving Focus to Next Control (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: XHTML Parser
Next thread: Re: Threads and Menus


Win32 API Declares   -   Berg, Heath
  Automatically Moving Focus to Next Control   -   Wayne Marsh
   Re: Automatically Moving Focus to Next Control   -   Loren
   Re: Automatically Moving Focus to Next Control   -   Emile Schwarz
   Re: Automatically Moving Focus to Next Control   -   Arnaud Nicolet
   Re: Automatically Moving Focus to Next Control   -   CV
   Re: Automatically Moving Focus to Next Control   -   Arnaud Nicolet
   Re: Automatically Moving Focus to Next Control   -   CV
   Re: Automatically Moving Focus to Next Control   -   Michael D Mays

Automatically Moving Focus to Next Control
Date: 01.08.05 06:00 (Mon, 01 Aug 2005 00:00:40 -0500)
From: Wayne Marsh
I have two editfields, Editfield1 and Editfield2. Editfield1 has a LimitText
property of 3. After the user types three characters into Editfield1, I'd
like the focus to jump immediately to Editfield2 without the user having to
press the tab key. How do I do that?

Wayne Marsh Minneapolis, Minnesota, USA
<email address removed>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Automatically Moving Focus to Next Control
Date: 01.08.05 06:07 (Sun, 31 Jul 2005 22:07:48 -0700)
From: Loren
in the editfield1 textchange:

if len(me.text)0then
EditField2.SetFocus
end if

On Jul 31, 2005, at 10:00 PM, Wayne Marsh wrote:

> I have two editfields, Editfield1 and Editfield2. Editfield1 has a
> LimitText
> property of 3. After the user types three characters into
> Editfield1, I'd
> like the focus to jump immediately to Editfield2 without the user
> having to
> press the tab key. How do I do that?
>
> Wayne Marsh Minneapolis, Minnesota, USA
> <email address removed>

_/ | \________________________________
Loren
RB Mac 2005P r1 and 555P and Win 555P Ide
Einhugarfied and monkey'd up
Tigger 10.4.1 - g5 2Gz 2gig ram
W2000 on Virt Pc and some junky laptop
discodj a~t mac _ c~o~m


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Automatically Moving Focus to Next Control
Date: 01.08.05 16:31 (Mon, 01 Aug 2005 17:31:57 +0200)
From: Emile Schwarz
Hi,

Once you have the three characters (count them in KeyDown), set the focus to
EditField2... using the EditField Control Method... SetFocus. So:

EditField2.SetFocus will ... set the focus to EditField2 ;)

HTH,

Emile

<email address removed> wrote:
> Subject: Automatically Moving Focus to Next Control
> From: Wayne Marsh <<email address removed>>
> Date: Mon, 01 Aug 2005 00:00:40 -0500
>
> I have two editfields, Editfield1 and Editfield2. Editfield1 has a LimitText
> property of 3. After the user types three characters into Editfield1, I'd
> like the focus to jump immediately to Editfield2 without the user having to
> press the tab key. How do I do that?

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Automatically Moving Focus to Next Control
Date: 02.08.05 14:11 (Tue, 2 Aug 2005 15:11:06 +0200)
From: Arnaud Nicolet
On 1 août 2005, at 05:31Soir, Emile Schwarz wrote:

> Hi,
>
> Once you have the three characters (count them in KeyDown), set the
> focus to EditField2... using the EditField Control Method... SetFocus.
> So:
>
> EditField2.SetFocus will ... set the focus to EditField2 ;)
>
> HTH,
>
> Emile
>
> <email address removed> wrote:
>> Subject: Automatically Moving Focus to Next Control
>> From: Wayne Marsh <<email address removed>>
>> Date: Mon, 01 Aug 2005 00:00:40 -0500
>> I have two editfields, Editfield1 and Editfield2. Editfield1 has a
>> LimitText
>> property of 3. After the user types three characters into Editfield1,
>> I'd
>> like the focus to jump immediately to Editfield2 without the user
>> having to
>> press the tab key. How do I do that?

If you count the characters in the KeyDown event, you will miss the
current character (thought you may determine if the "Key" is a
printable one).
Instead, count them in the TextChange event.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Automatically Moving Focus to Next Control
Date: 03.08.05 00:56 (Tue, 2 Aug 2005 16:56:44 -0700)
From: CV

On Aug 2, 2005, at 6:11 AM, Arnaud Nicolet wrote:

> On 1 août 2005, at 05:31Soir, Emile Schwarz wrote:
>
>> Hi,
>>
>> Once you have the three characters (count them in KeyDown), set the
>> focus to EditField2... using the EditField Control Method...
>> SetFocus. So:
>>
>> EditField2.SetFocus will ... set the focus to EditField2 ;)
>>
>> HTH,
>>
>> Emile
>>
>> <email address removed> wrote:
>>> Subject: Automatically Moving Focus to Next Control
>>> From: Wayne Marsh <<email address removed>>
>>> Date: Mon, 01 Aug 2005 00:00:40 -0500
>>> I have two editfields, Editfield1 and Editfield2. Editfield1 has a
>>> LimitText
>>> property of 3. After the user types three characters into
>>> Editfield1, I'd
>>> like the focus to jump immediately to Editfield2 without the user
>>> having to
>>> press the tab key. How do I do that?
>
> If you count the characters in the KeyDown event, you will miss the
> current character (thought you may determine if the "Key" is a
> printable one).
> Instead, count them in the TextChange event.
>

Counting in either KeyDown or TextChange works for me.

Jack

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Automatically Moving Focus to Next Control
Date: 03.08.05 13:14 (Wed, 3 Aug 2005 14:14:04 +0200)
From: Arnaud Nicolet
On 3 août 2005, at 01:56Mat, CV wrote:

> On Aug 2, 2005, at 6:11 AM, Arnaud Nicolet wrote:
>
>> On 1 août 2005, at 05:31Soir, Emile Schwarz wrote:
>>
>>> Hi,
>>>
>>> Once you have the three characters (count them in KeyDown), set the
>>> focus to EditField2... using the EditField Control Method...
>>> SetFocus. So:
>>>
>>> EditField2.SetFocus will ... set the focus to EditField2 ;)
>>>
>>> HTH,
>>>
>>> Emile
>>>
>>> <email address removed> wrote:
>>>> Subject: Automatically Moving Focus to Next Control
>>>> From: Wayne Marsh <<email address removed>>
>>>> Date: Mon, 01 Aug 2005 00:00:40 -0500
>>>> I have two editfields, Editfield1 and Editfield2. Editfield1 has a
>>>> LimitText
>>>> property of 3. After the user types three characters into
>>>> Editfield1, I'd
>>>> like the focus to jump immediately to Editfield2 without the user
>>>> having to
>>>> press the tab key. How do I do that?
>>
>> If you count the characters in the KeyDown event, you will miss the
>> current character (thought you may determine if the "Key" is a
>> printable one).
>> Instead, count them in the TextChange event.
>>
> Counting in either KeyDown or TextChange works for me.
>
> Jack

In the keydown event, you count one less character than in the
TextChange (normally). So, if you press, say, the left arrow and the
count is as you expect, the code will react like if this key is a
typing character.

Or... how are you doing?
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Automatically Moving Focus to Next Control
Date: 03.08.05 17:27 (Wed, 3 Aug 2005 09:27:01 -0700)
From: CV

On Aug 3, 2005, at 5:14 AM, Arnaud Nicolet wrote:

> On 3 août 2005, at 01:56Mat, CV wrote:
>
>> On Aug 2, 2005, at 6:11 AM, Arnaud Nicolet wrote:
>>
>>> On 1 août 2005, at 05:31Soir, Emile Schwarz wrote:
>>>
>>>> Hi,
>>>>
>>>> Once you have the three characters (count them in KeyDown), set the
>>>> focus to EditField2... using the EditField Control Method...
>>>> SetFocus. So:
>>>>
>>>> EditField2.SetFocus will ... set the focus to EditField2 ;)
>>>>
>>>> HTH,
>>>>
>>>> Emile
>>>>
>>>> <email address removed> wrote:
>>>>> Subject: Automatically Moving Focus to Next Control
>>>>> From: Wayne Marsh <<email address removed>>
>>>>> Date: Mon, 01 Aug 2005 00:00:40 -0500
>>>>> I have two editfields, Editfield1 and Editfield2. Editfield1 has a
>>>>> LimitText
>>>>> property of 3. After the user types three characters into
>>>>> Editfield1, I'd
>>>>> like the focus to jump immediately to Editfield2 without the user
>>>>> having to
>>>>> press the tab key. How do I do that?
>>>
>>> If you count the characters in the KeyDown event, you will miss the
>>> current character (thought you may determine if the "Key" is a
>>> printable one).
>>> Instead, count them in the TextChange event.
>>>
>> Counting in either KeyDown or TextChange works for me.
>>
>> Jack
>
> In the keydown event, you count one less character than in the
> TextChange (normally). So, if you press, say, the left arrow and the
> count is as you expect, the code will react like if this key is a
> typing character.
>
> Or... how are you doing?

I was incrementing a counter, but, yes, you are absolutely right.
Counting characters using Len in TextChange is the way to go.

Best,

Jack

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Automatically Moving Focus to Next Control
Date: 05.08.05 18:09 (Fri, 5 Aug 2005 12:09:29 -0500)
From: Michael D Mays

On Aug 2, 2005, at 6:56 PM, CV wrote:

>
> On Aug 2, 2005, at 6:11 AM, Arnaud Nicolet wrote:
>
>> On 1 août 2005, at 05:31Soir, Emile Schwarz wrote:
>>
>>> Hi,
>>>
>>> Once you have the three characters (count them in KeyDown), set the
>>> focus to EditField2... using the EditField Control Method...
>>> SetFocus. So:
>>>
>>> EditField2.SetFocus will ... set the focus to EditField2 ;)
>>>
>>> HTH,
>>>
>>> Emile
>>>
>>> <email address removed> wrote:
>>>> Subject: Automatically Moving Focus to Next Control
>>>> From: Wayne Marsh <<email address removed>>
>>>> Date: Mon, 01 Aug 2005 00:00:40 -0500
>>>> I have two editfields, Editfield1 and Editfield2. Editfield1 has a
>>>> LimitText
>>>> property of 3. After the user types three characters into
>>>> Editfield1, I'd
>>>> like the focus to jump immediately to Editfield2 without the user
>>>> having to
>>>> press the tab key. How do I do that?
>>
>> If you count the characters in the KeyDown event, you will miss the
>> current character (thought you may determine if the "Key" is a
>> printable one).
>> Instead, count them in the TextChange event.
>>
> Counting in either KeyDown or TextChange works for me.
>
> Jack

If you use the backspace or cut something out of or paste something
into, counting characters via KeyDown won't work.

Michael

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>