[fxruby-users] composite widgets

Jacob Hanson jacdx at jacobhanson.com
Thu May 12 03:06:08 EDT 2005


Sunday, May 8, 2005, 3:09:19 PM, you wrote
> Hello Jacob.
> Yu can actually do this in FXRuby.

> Usually, you'd subclass a container widget like FXPacker, FXMatrix or
> FXVerticalFrame. That's the most
> preferable way to easily to manage and react child widgets. Even in C++
> that's the best solution since
> most of the child wigets are going to be automatically destroyed by 
> their parent, then.

Thanks Jannis,

I have begun implementing it based off of FXVerticalFrame. Here's a
related question. This widget needs to expand/contract based on the
number of items that have been added to it. I can do this after
everything is created and call myframe.create; myframe.recalc to
update the controls that need to be drawn or hidden and resize my
frame accordingly. But! If I attempt to add or remove an item
before the rest of the containing window is drawn for the first time,
I get a segfault when trying to .create. Is there a way to test if
I need to run .create or should I be doing something different?

Thanks,

Jacob




More information about the fxruby-users mailing list