Focus question

Hi all

Python 2.3.4 wxPython 2.6.1.0

Under MSW, the focus jump over the wx.TextCtrl witch are ReadOnly and under Linux (Mandriva 10.1) the focus go to them.
Is there a solution for the focus do the same under Linux than MSW ?

Thanks in advance for your help ...

Friendly.

···

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

I’m not certain what the situation is, but you can always manually call SetFocus() for your widgets, since they all inherit from wx.Window. That should give you the same behavior on all platforms, regardless of the default.

-Saketh

···

On 9/10/06, Hugues JEAN-BAPTISTE hjb@agorinfo.fr wrote:

Hi all

Python 2.3.4 wxPython 2.6.1.0

Under MSW, the focus jump over the wx.TextCtrl witch are ReadOnly and
under Linux (Mandriva 10.1) the focus go to them.
Is there a solution for the focus do the same under Linux than MSW ?

Thanks in advance for your help …

Friendly.

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr
)


To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org

For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

Bind wx.EVT_SET_FOCUS to the control you want to skip, and have the
binding call the widget.SetFocus() for the widget you want to have focus.

- Josiah

···

Hugues JEAN-BAPTISTE <hjb@agorinfo.fr> wrote:

Hi all

Python 2.3.4 wxPython 2.6.1.0

Under MSW, the focus jump over the wx.TextCtrl witch are ReadOnly and
under Linux (Mandriva 10.1) the focus go to them.
Is there a solution for the focus do the same under Linux than MSW ?

Thanks in advance for your help ...

Josiah Carlson a écrit :

···

Hugues JEAN-BAPTISTE <hjb@agorinfo.fr> wrote:
  

Hi all

Python 2.3.4 wxPython 2.6.1.0

Under MSW, the focus jump over the wx.TextCtrl witch are ReadOnly and under Linux (Mandriva 10.1) the focus go to them.
Is there a solution for the focus do the same under Linux than MSW ?

Thanks in advance for your help ...
    
Bind wx.EVT_SET_FOCUS to the control you want to skip, and have the
binding call the widget.SetFocus() for the widget you want to have focus.

- Josiah
  

Under MSW, the user go from one non ReadOnly field to another with the <Tab> key.
But he can go with the mouse in the field for a mouse copy action.
If I Bind wx.EVT_SET_FOCUS, the user never can go to the field.

I am not sure my explanation will be understood by someone (Sorry for my bad English) ...

--

Hugues JEAN-BAPTISTE (hjb@agorinfo.fr)
AGORINFO S.A.S. (http://www.agorinfo.fr)

Bind wx.EVT_KEY_DOWN to detect the press of tab on the control before
your read-only text control, and manually set focus. Alternatively, use
window.MoveAfterInTabOrder(...) or window.MoveBeforeInTabOrder(...) .
You may be able to adjust the tab order such that your read-only text
control isn't even in the order, but I haven't tried such a thing.

- Josiah

···

Hugues JEAN-BAPTISTE <hjb@agorinfo.fr> wrote:

Josiah Carlson a écrit :
> Hugues JEAN-BAPTISTE <hjb@agorinfo.fr> wrote:
>
>> Hi all
>>
>> Python 2.3.4 wxPython 2.6.1.0
>>
>> Under MSW, the focus jump over the wx.TextCtrl witch are ReadOnly and
>> under Linux (Mandriva 10.1) the focus go to them.
>> Is there a solution for the focus do the same under Linux than MSW ?
>>
>> Thanks in advance for your help ...
>>
>
> Bind wx.EVT_SET_FOCUS to the control you want to skip, and have the
> binding call the widget.SetFocus() for the widget you want to have focus.
>
> - Josiah
>
Under MSW, the user go from one non ReadOnly field to another with the
<Tab> key.
But he can go with the mouse in the field for a mouse copy action.
If I Bind wx.EVT_SET_FOCUS, the user never can go to the field.

I am not sure my explanation will be understood by someone (Sorry for my
bad English) ...