Re: replacing widgets in packing boxes

On Aug 7, 2006, at 6:41 PM, Dirk Koopman wrote:

I have the reference "$widget" available to me as well as its parent's.

So to answer my own question for now: I create an empty vbox() and
remember its reference (a palaver in itself) and then remove any old
widget (maybe none) and (re-)pack_start the new one. The vbox() will
only have one item in it which will fill it to the maximum space

If you have the child of the vbox, you can avoid keeping the reference tothe vbox itself by doing $vbox = $widget->get_parent. Depends on how much bookkeeping overhead it is.

"the ternary operator makes it a bit less ugly."
    -- kaffee

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