Thomas Waldinger wrote:
> I'm trying to get the height of a Fl_Pack after adding some
> widgets to it.
> the allignment is as expected, but the output of h() always stays
> the same as initially set. (see code below);
Yes; Fl_Pack::h() just returns the height of the Fl_Pack container,
which will always be the size you created it (unless you change
eg. the container's size with Fl_Pack::resize(), or if the parent
window is resized).
I don't think Fl_Pack has a method for accessing the area
the child widgets are taking up; maybe it should. Feel free
to make an STR requesting this method be added to Fl_Pack.
It sounds like to get the info you want, you'd need to walk the
Fl_Pack's array of children (see the Fl_Group's docs, from which
Fl_Pack derives) to find the maximum height of the child widgets.
A clean way to do this would be to derive from Fl_Pack, and make
your own methods to access the info from Fl_Group.
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk