Re: [gtk-list] Re: GtkText widget handling of "default values"

On Wed, 7 Apr 1999 wrote:

> Hi Andreas, you could attach a signal to "focus_in_event" and do the
> select_region then. That would work for mouse and for <tab>.
I've done this:

static void FocusInEntry(GtkWidget *entry)
  g_return_if_fail ( entry ) ;
  g_return_if_fail ( GTK_IS_ENTRY(entry) ) ;
  gtk_editable_select_region(GTK_EDITABLE(entry), 0, -1);

  gtk_signal_connect(GTK_OBJECT(entry), "focus_in_event",
                     GTK_SIGNAL_FUNC(FocusInEntry), entry);

Some printf() showd me that FocusInEntry() is called right but it
didn't show any effect.  What am I doing wrong?

> You should be able to do a similar trick here: attach a signal to
> filesel->selection_entry. 
Furthermore I've done:

  fs = gtk_file_selection_new(title);

  gtk_file_selection_set_filename(GTK_FILE_SELECTION(fs), name);
             GTK_EDITABLE(GTK_FILE_SELECTION(fs)->selection_entry), 0, -1);

But also with no effect.  What's wrong here.

Kind regards and thanks for your patience


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