[fxruby-users] Add a tab to a tabbok dynamically?

Philippe Lang philippe.lang at attiksystem.ch
Tue Oct 3 09:46:54 EDT 2006

Jeroen van der Zijp wrote:

> If you add new widgets on the fly, don't forget to .create
> them.  The ones that exist at the time you call
> application.create will be recursively created, new ones
> weren't part of the widget tree yet at that time.
> You were right about recalc, although you should call it on
> the widget you added the new children to [in this case,
> tabbook.  The call to recalc flags the tabbook's layout as
> "dirty", and when control returns to the event loop it will
> perform a layout on the dialog.
> In FOX, layouts are delayed, which means you can make many
> changes to your widget tree, but incur the cost of the
> [expensive] layout only a single time.
> Its therefore very rare that you want to call layout
> directly; most of the time recalc suffices.  Recalc is cheap
> because all it does is set dirty flags on a couple of widgets.

It works great, thanks a lot for your help.


Philippe Lang
Attik System

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3125 bytes
Desc: not available
Url : http://rubyforge.org/pipermail/fxruby-users/attachments/20061003/b468b846/attachment.bin 

More information about the fxruby-users mailing list