Re: Selecting the region in GtkFileSelection



On Wed, 2004-09-08 at 09:37, Pramod Patangay wrote:
> Hi,
> 
> I have created a GtkFileSelection, set the filename
> and want the filename region to be selected. Here's
> what I am doing:
> 
> GtkWidget *a = gtk_file_selection_new("Hmmm");
> gtk_file_selection_set_filename(GTK_FILE_SELECTION(a),"TestFile");
> GtkWidget *ase =
> (GTK_FILE_SELECTION(a))->selection_entry;
> gtk_entry_set_text(GTK_ENTRY(ase),"Hope");
> gtk_editable_select_region(GTK_EDITABLE(ase),0,-1);
> gtk_widget_show(ase);
> gtk_widget_show(a);
> 
> But this doesn't work. Any ideas what's wrong here and
> how to get the filename region selected?
> (I am using GTK 2.0.9)

I think if you do it after gtk_widget_show(a) it might work.

I remember fixing this a year or two ago.. 2.0.9 is a pretty
old version of GTK+.

Regards,
					Owen

Attachment: signature.asc
Description: This is a digitally signed message part



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