Re: newbie: How do I place cursor(set focus) in specific gtkentry?
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: David Capps <cncprgr aim com>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: newbie: How do I place cursor(set focus) in specific gtkentry?
- Date: Thu, 25 May 2006 15:10:20 +0200
On Thu, May 25, 2006 at 06:34:55AM -0500, David Capps wrote:
I am putting together a simple app (using Python 2.4,
gtk-win32-2.8.6-rc2, Glade 2.12.1, GladeGen) that does some
calculations. It has three entry boxes, some labels and a couple of
buttons. When one button is clicked it clears the entry boxes and leaves
the clicked button with focus. I want to have the cursor move to the
first entry box so I can begin typing immediately, without having to
click in the first entry with mouse. How do I do this?
Use gtk_widget_grab_focus() to give focus to the entry. The
Python equivalent is widget.grab_focus(). You may also need
gtk_button_set_focus_on_click() to stop the button from
grabbing focus on click.
Yeti
--
Anonyms eat their boogers.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]