Re: [gtkmm] pack_start and AttachOptions is still confusing
- From: "Marcelo E. Magallon" <marcelo magallon bigfoot com>
- To: gtkmm-list <gtkmm-list gnome org>
- Subject: Re: [gtkmm] pack_start and AttachOptions is still confusing
- Date: Mon, 15 Jul 2002 22:45:25 +0200
>> Michael Babcock <mbabcock la creatureshop henson com> writes:
> > After thinking about it, the example I mentioned previously now makes
> > sense: a horizontal separator without "fill" set has null size. But
> > you don't want to set expand on it because you want it to be as large
> > as the largest element in the group, not larger.
>
> Do you mean 0 horizontal size?
Yes.
> A separator without "fill" is Gtk::SHRINK
Uhm... I guess. The source of my confusion is that for tables you can
set EXPAND *and* FILL *and* SHRINK independently. If all three are set
to false, all I get (for a horizontal separator) is a dot. If I set
FILL, then I get a line as wide as the widest element in the column.
If I set EXPAND I get a line which makes the whole column wider.
> and it wouldn't make sense to set that horizontally for a hseparator
> because as you say the size would shrink to zero.
Right.
> By group, you mean column, right?
Yes.
> Yes, with a Table you have the additional factor of the column width,
> so you can be allocated more space than expected with a Box. So
> Gtk::SHRINK is equivalent to Gtk::EXPAND if another row has a wider
> column!
Yes.
> I guess I'm basically agreeing with you, just trying to understand
> the issue better. The problem here _seems_ to be an overloading of
> the EXPAND term. In the case of a Table, it both indicates to fill
> extra allocated column space with padding, _and_ possibly to expand
> the amount allocated to that widget within the row, which in turn
> would increase the column size.
Yes.
> Gtk::SHRINK expands the column to at least the widget's size request.
> If the column is wider, fill extra space with padding.
Ok. Got it. I have to set the widget's width and SHRINK. I don't
need FILL. The widget will have the size I specified if the column is
wider. If I don't set SHRINK the widget contracts to it minimum size.
> Gtk::EXPAND expands the cell based on the other cells in the row. Set
> the colunn width to the maximum of the cell width and existing column
> width, fill extra space with padding.
Yes.
> Gtk::EXPAND|Gtk::FILL as above, but fills space by increasing widget
> size.
Yes.
> So Gtk::FILL alone would be like Gtk::EXPAND|Gtk::FILL except it
> would not increase the column width? It does seem to be different
> than Gtk::SHRINK, right?
Yes, now I see the difference. It only exists if I specify a minimum
width. (Same thing in the y direction).
Thanks,
Marcelo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]