I have an application which has a child dialog box which is used as a login screen … (see sample code below) … what I would like to do is when this method is called, to have the cursor automatically be set in the username test control box ready to type text … rather than having to manually place the cursor in the field with the mouse … I know it must be simple … but I have not been able to locate the appropriate info … would someone be kind enough to point me to some documentation regarding how to do this or some pointers in the right direction
I have an application which has a child dialog box which is used as a login
screen .... (see sample code below) ... what I would like to do is when this
method is called, to have the cursor automatically be set in the username
test control box ready to type text ... rather than having to manually place
the cursor in the field with the mouse ... I know it must be simple ... but I
have not been able to locate the appropriate info .... would someone be kind
enough to point me to some documentation regarding how to do this or some
pointers in the right direction
----- Original Message -----
From: "Corrado Santoro" <csanto@diit.unict.it>
To: <wxpython-users@lists.wxwindows.org>
Sent: Friday, September 06, 2002 7:42 PM
Subject: Re: [wxPython] Setting cursor to default to wxTextCtrl in wxPython
try this:
self.user_name_login_box.SetFocus ()
Quoting Ben Catanzariti <benc@rehame.com>:
> # Platform = Win32
> # Python Version = 2.1.x
>
> Hi there,
>
> I have an application which has a child dialog box which is used as a
login
> screen .... (see sample code below) ... what I would like to do is when
this
> method is called, to have the cursor automatically be set in the
username
> test control box ready to type text ... rather than having to manually
place
> the cursor in the field with the mouse ... I know it must be simple ...
but I
> have not been able to locate the appropriate info .... would someone be
kind
> enough to point me to some documentation regarding how to do this or
some
> pointers in the right direction
>
> thanks in advance
>
> Ben
>
>
>
>
> def OnLogIn(self, event):
> self.login_dialogue = wxDialog(self, -1, "Login",