List Info

Thread: Add a tab to a tabbok dynamically?




Add a tab to a tabbok dynamically?
user name
2006-10-03 13:46:54
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.

Cheers,

---------------
Philippe Lang
Attik System

_______________________________________________
fxruby-users mailing list
fxruby-usersrubyforge.org
ht
tp://rubyforge.org/mailman/listinfo/fxruby-users
[1]

about | contact  Other archives ( Real Estate discussion Medical topics )