[Gtk-sharp-list] Redraw window
Mathias Tausig
mtausig at fsmat.at
Tue May 20 03:54:24 EDT 2008
Hy!
I think you misunderstood me. The FileChooserDialog is displayed just
fine. My problem lies after the fc.Destroy(). The dialog is closed then,
but the remaining part of the UI remains unusable, before the event
handler ends.
cheers
Mathias
> Hi:
>
> I don't understand well the exceptions here, but perhaps it was well. I
> use more simple code.
>
> I see in gtkmm, ruby/gnome and obvioulsy in the C API:
>
> GTK# sample:
> http://www.go-mono.com/docs/index.aspx?link=T%3aGtk.FileFilter
> Ruby sample:
> http://ruby-gnome2.sourceforge.jp/hiki.cgi?Gtk%3A%3AFileChooserDialog
> GTKMM sample:
> http://www.gtkmm.org/docs/gtkmm-2.4/docs/tutorial/html/sec-dialogs-filechooserdialog.html
>
> ruby and c++ have exceptions like c# but they don't use it here.
>
>
> For me the C API is always my reference:
> http://library.gnome.org/devel/gtk/2.11/GtkFileChooserDialog.html
>
>
> I test this simple code to solve your problem i think:
>
>
>
> protected virtual void OnButton1Clicked (object sender,
> System.EventArgs e)
> {
>
> FileChooserDialog fc=new FileChooserDialog("hola mundo",this,
>
> FileChooserAction.Open, "Abort", ResponseType.Cancel, "Open",
> ResponseType.Accept);
>
> Gtk.FileFilter filter=new Gtk.FileFilter();
> filter.Name="C/C++ files";
> filter.AddPattern("*.cc");
> fc.AddFilter(filter);
>
>
> if (fc.Run()==(int)ResponseType.Accept) {
> System.Console.Write("filename is {0} \n",fc.Filename);
>
> }
> fc.Destroy();
>
> fc=new FileChooserDialog("hola mundo",this,
>
> FileChooserAction.Open, "Abort", ResponseType.Cancel, "Open",
> ResponseType.Accept);
>
> if (fc.Run() ==(int)ResponseType.Accept) {
> System.Console.Write("filename is {0} \n",fc.Filename);
>
> }
> fc.Destroy();
>
>
>
> }
>
>
> can this help you?
>
>
> Regards.
>
>
>
>
> _______________________________________________
> Gtk-sharp-list maillist - Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
>
More information about the Gtk-sharp-list
mailing list