stretch factors in GTK+ 2.0



Does anyone know or have a container like an HBox, VBox or Table that
supports the notion of a "stretch factor" or something that is generally
eqiuvalent (like partionable boxes).

The notion of a stretch factor (I'm taking this term from Qt and
wxWindows) is a generalization of EXPAND and HOMOGENOUS. 

The stretch factor is an integer >= 0 associated with each item added to
a Box (a VBox or an HBox) or table. The stretch factor allows you to
specify the expanded size relative to the other "stretchable" members in
the box. In otherwords, all members with the same stretch factor will be
expanded to the same size. Members with a stretch factor of 1 will be
half the size of those with a stretch factor of 2.


The reason I need this (although I think it might be nice to have in
general) is that I want to have an HBox with three items where the
middle item is always centered within the entire box. By setting the
stretch factor of the first and last items to 1 the middle item will
always be centered because the two side items will be EXPANDED to the
same size.


Anybody know of an implementation that will do this?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]