[Gtk-sharp-list] Newbie in GTK#:Glade, Statusbar Eventbox ?

underdog10 at netcourrier.com underdog10 at netcourrier.com
Tue Oct 10 04:40:22 EDT 2006


Hello,

I have made a fully complexe GUI where i construct everything on my own.
I trying to migrate to a Glade GUI so i will be abble to easily re-design the GUI without changing the code
I have allready port all the dialog. I having problem with my main window.

I also, i notice some hard stuff to make with Galde. For example the toolbar with your own icon. Glade doesn't support image from resources.
But i find a way to turn around.

So my problem is about statusbar and event box.
The code below is compiling fine, but status bar stuff i not doing anything.
It is the same code than use with my own interface.
On my glade file, i only declare a statusbar.

An another question, is why sometimes i don't have to declare the glade element. For example to modify the window icon without initializing it.
But it is not working for the textview, Why?

Thanks in advance.


Glade.XML gxml = new Glade.XML (null, "test.glade", "window1", null);
Toptoolbar = (Gtk.Toolbar) gxml["toolbar1"];
textview = (Gtk.TextView) gxml["textview"];
statusbar = (Gtk.Statusbar) gxml["statusbar1"];
gxml.Autoconnect (this);
// Event

// Icon
window1.Title = NAME + " " + VERSION;
window1.Icon = new Pixbuf(null, "icon.png");
pix = new Gdk.Pixbuf (null, "logo.png");	
logo.FromPixbuf = pix;

// Toolbar
MyToolbar CreateToolbar = new MyToolbar (this);
Toptoolbar = CreateToolbar.CreateTopToolbar (Toptoolbar);

// Log view
buf = textview.Buffer;
textview.Editable = false;

// Status bar
statusbar.Push (1, "Ready.");
statusbar.Homogeneous = false;
statuslabel = new Label(" My Stuff ");
EventBox ebox = new EventBox ();
ebox.Add (statuslabel);
ebox.ButtonPressEvent += new ButtonPressEventHandler (OnLabelButtonPressEvent);
tooltips.SetTip (ebox, " Select Active Connection ", "");
statusbar.PackStart(ebox, false, false, 0);
OnLineStatusImg = new Gtk.Image(Stock.No, Gtk.IconSize.SmallToolbar);
statusbar.PackStart(OnLineStatusImg, false, false, 0);
// END of status bar 




More information about the Gtk-sharp-list mailing list