[10518] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: Gtk_Fixed
daemon@ATHENA.MIT.EDU (James E. Blair)
Sun Nov 29 11:45:02 1998
To: gtk-list@redhat.com
From: corvus@gnu.org (James E. Blair)
Date: 29 Nov 1998 11:44:40 -0500
In-Reply-To: Kasper Peeters's message of "Sun, 29 Nov 1998 14:33:39 +0000 (GMT)"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
Kasper Peeters <K.Peeters@damtp.cam.ac.uk> writes:
> Can anyone explain how Gtk_Fixed of gtk-- is supposed to work? I tried
> something along the lines of
...
> mywindow.add(&myfixed);
> myfixed.add(&mybutton);
> myfixed.put(mybutton,100,50);
>
> but, depending on where I put the 'show' calls, this always seems to
> yield a working example but runtime errors (complaining about null
> children/parents) or nothing at all.
I think that, in this case, you don't want to use the add() call on
mybutton. A fixed::add() just calls a fixed::put() at position 0,0.
Your code above adds mybutton twice, and the fixed widget doesn't
like that. So the right thing to do would be to omit the
myfixed::add() call.
mywindow.add(&myfixed);
myfixed.put(mybutton,100,50);
If you use fixed::add() then you can't use fixed::put(); you should
use fixed::move() once the widget is added.
-Jim
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null