Re: Setting usize to (0,0)
- From: Ronald Bultje <rbultje ronald bitfreak net>
- To: "Ian King [ES]" <king eiffel com>
- Cc: gtk-list gnome org
- Subject: Re: Setting usize to (0,0)
- Date: 07 Nov 2002 23:33:23 +0100
Hi Ian,
On Thu, 2002-11-07 at 22:04, Ian King [ES] wrote:
> > set_usize(0) doesn't shrink, it sets the size to 'no other size than 0'.
> Sure, so this means it should have an initial size of (0, 0), unless placed
No, it just means to have a final size of (0, 0).
> in to a container where it can expand to its allocation. set_usize is
> totally disregarding zero as a value, is this a bug? Most of our containers
A feature, I guess. size <= 0 aren't real sizes, they're interpreted so
that auto-sizing will be applied, just like for any default widget. I
often used set_usize(-1, 24); to set a height of 24 and a 'whatever'
width, or the other way around, in Gtk-1.2 (note that set_usize() is
deprecated in Gtk-2.0).
The Gtk experts on this list can probably tell you more about this. I'd
use a GdkWindow that I'd paint on and resize/locate that manually in the
widget, or something similar, where auto-sizing is still used for your
widget, and the widget fills in the space it gets in whatever way is
needed.
Ronald
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]