[Gtk-sharp-list] Glade and ToolBar
Dolapo M Falola
Mon, 23 Aug 2004 09:39:35 -0500
Another trick I've used in the past is:
Tool bar buttons are created as Gtk.Bin objects.
You can get at the actual Button object through the child property of=20
the Bin object, i.e.
Button zoomIn =3D (Button)this.zoomInToolButton.Child;
then you can add events and accelerators directly to that button:
zoomIn.Clicked +=3D new EventHandler(OnZoomInToolButtonClicked);
bit of a hack, but it's a work around
RUAUDEL Fr=E9d=E9ric wrote:
> I confirmed that I had the same problem (any button created in a=20
> toolbar never appears in the final app) and I worked around it by=20
> creating the toolbar by hand but it would be great if it can be fixed. =
> also tried to use an older glade (V2.2 instead of V2.4 that was in my=20
> FC2) to avoid the new 2.4 widgets but I run with the same problems.
> Best regards,
> Olivier -Staz- L=EA Thanh wrote:
>> it seem there is a problem making a ToolBarButton work in glade.
>> The bug is perfectly reproducible, create a window in glade add it a
>> toolbar and a toolbar button, connect the clicked signal, program the
>> corresponding callback function. Compile, launch the program, click, a=
>> nothing happen.
>> Is there a problem in my program or callback function (no error at
>> compiling or at running and the .glade file seem to be fine since it
>> work in pygtk) or is it a bug in gtk-sharp (didn't found anything in
>> bugzilla and I'm using version 1.0)?
>> Thanks for any help,
> Gtk-sharp-list maillist - Gtkemail@example.com