[Gtk-sharp-list] Setting the parent Gtk.Window of a FileChooserDialog inserted in a Gtk.Bin

Chris Howie cdhowie at gmail.com
Fri Aug 22 12:39:05 EDT 2008


On Fri, Aug 22, 2008 at 9:30 AM, Andoni Morales Alastruey
<ylatuya at gmail.com> wrote:
> Hi!
>
> I'm facing the following problem:
> I have a class TestDialog wich extends Gtk.Dialog. This class contains
> another class ReusableWidget wich extends Gtk:bin. The TestBin a button
> that shows a FileChooserDialog:
> FileChooserDialog fChooser = new FileChooserDialog ( "", null,
> FileChooserAction.Open ,"gtk-cancel", ResponseType.Cancel,
> "gtk-open",ResponseType.Accept);
>
> As this is called from the Gtk:bin I cannot set the the parent window
> doing:
> FileChooserDialog fChooser = new FileChooserDialog ( "", this,...

Use ((Window) this.Toplevel) as the parent.

-- 
Chris Howie
http://www.chrishowie.com
http://en.wikipedia.org/wiki/User:Crazycomputers


More information about the Gtk-sharp-list mailing list