Re: a wrapbox widget

On 2003.05.27 05:26, Charles Lambert wrote:
> > Well, how do you handled homogeneous property?
> by checking for the largest width and height of all
> the child widgets, and use that as size_request. Then
> I do the same thing in the size_allocate, but also
> apply any remaining space to each widget. Note that
> you have to change the size enough for a widget to fit
> on at the end. for example, if there are 12 widgets
> and only five fit in a row, and there space left over
> that amounts to about half the width of the 6th widget
> (1st widget in the next row) then homogenous will fill
> that extra space

Yeah, that the way GtkBox(or GtkToolbar?) have already done.

Why don't you use GtkSizeGroup? It's implemented to manage
synchronizing size of multiple widgets from the begining.
And It'll reduce a number of lines of code from gtkwrapbox.c.


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