Re: gtk programming question



You probably want gtk_widget_grab_focus().  If the event that should give
the entry focus also moves the focus, you could try using an idle function
like this:
  gboolean give_focus(gpointer data) {
	GtkWidget *widget = GTK_WIDGET(data);

	gtk_widget_grab_focus(widget);
	return FALSE;
  }

James.

--
Email: james@daa.com.au
WWW:   http://www.daa.com.au/~james/


On Thu, 27 May 1999, Fox, Kevin M wrote:

> I have an text entry box in my program. I would like to set focus to it when
> a button is pressed. What function do I use to give the entry widget focus?
> 
> 
> -- 
>         FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
>          To unsubscribe: mail gnome-list-request@gnome.org with 
>                        "unsubscribe" as the Subject.
> 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]