[Gtk-sharp-list] Glade and ToolBar

Dolapo M Falola dolapo@minivishnu.net
Mon, 23 Aug 2004 09:39:35 -0500


Hello,
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

- Dolapo

RUAUDEL Fr=E9d=E9ric wrote:
> Hi,
>=20
>   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. =
I=20
> 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.
>=20
> Best regards,
>=20
> Fred
>=20
> Olivier -Staz- L=EA Thanh wrote:
>=20
>> Hi,
>>
>> 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=
nd
>> 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,
>> Olivier.
>> =20
>>
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list