[Gtk-sharp-list] Gnome.CanvasWidget possible bug
Manuel Alejandro Ceron Estrada
ceronman@gmail.com
Fri, 04 Mar 2005 11:19:15 -0500
Hi Paulo,
Two things:
1. You need to show the Widget which is in the CanvasWidget, if it's a
box you should use ShowAll();
2. You must set Width and Height properties of the CanvasWidget.
Your AddWidget should be like this:
private void AddWidget()
{
VBox v = new VBox();
v.PackStart(new Label("Testing label"), false, false,0);
v.PackStart(new Button("Testing button"), false, false,0);
v.ShowAll();
Gnome.CanvasWidget canvas_widget = new Gnome.CanvasWidget(canvas.Root());
canvas_widget.Width = 100;
canvas_widget.Height = 100;
canvas_widget.Widget = v;
canvas_widget.Show();
}
Manuel.
Paulo Pires escribió:
> Hi fellows
>
> I've done this simple test in order to help knowing if this is a bug or
> just lammeness :)
>
> The problem is that Gnome.CanvasWidgetshould be appearing on the
> Gnome.Canvas and it isn't.
>
> I'd love to know how to add an Gnome.CanvasItem to the upper-left corner
> of the canvas, since I'm unable to get it in my tests with
> Gnome.CanvasPixbuf.
>
> I'm using Mono 1.1.4 and latest gtk-sharp svn revision.
> I've compilled and ran the test as follows:
> mcs -pkg:gtk-sharp,gnome-sharp test.cs
> mono test.exe
>
> Thanks in advance,
> Paulo Pires
--
· Manuel Alejandro Cerón Estrada <ceronman@gmail.com>
· http://ceronman.blogspot.com