[Mono-list] Building GUI with glade not working

Carlos Ble carlosble at shidix.com
Thu Oct 6 08:58:40 EDT 2005


El mié, 05-10-2005 a las 21:42 -0500, Fabian Salamanca Dominguez
escribió:
> Hi!
> 
> I created a test GUI with Glade in Windows and then I tried to build a
> mono (1.1.8) app with that GUI using the following code:
> 
> //*******************
> using System;
> using Gtk;
> using Glade;
> 
> public class GladeApp
> {
>         public static void Main (string[] args)
>         {
>                 new GladeApp (args);
>         }
> 
>         public GladeApp (string[] args) 
>         {
>                 Application.Init();
> 
>                 Glade.XML gxml = new Glade.XML (null, "gui.glade",
> "GUI2", null);
>                 gxml.Autoconnect (this);
>                 Application.Run();
>         }
> 
>         /* Connect the Signals defined in Glade */
>         public void OnWindowDeleteEvent (object o, DeleteEventArgs
> args) 
>         {
>                 Application.Quit ();
>                 args.RetVal = true;
>         }
> }
> //****************
> 

Try :
Glade.XML gxml = new Glade.XML ("gui.glade", "container", "");
Second parameter must match the main container widget name you want to
get from gui.glade (usually "window1"). File gui.glade must be in same
directory. You can algo include gui.glade inside .exe compiling with
-resource:gui.glade





More information about the Mono-list mailing list