[fxruby-users] FXSplitter width is 1 until created

Joel VanderWerf vjoel at path.berkeley.edu
Thu Apr 26 19:10:57 EDT 2007


Joel VanderWerf wrote:
> Why is the width of an FXSplitter equal to 1 before the 
> FXSplitter#create method is called?
> 
> My splitter is configured to have LAYOUT_FILL_X, so wouldn't its width 
> be determined before its children were created?
> 
> It's not really a big deal, but I was configuring the split based on a 
> preferences file during initialize, and couldn't make it work properly. 
> Doing it in #create is an acceptable workaround.
> 
> This isn't a problem with FX4Splitter. The splitting is implemented 
> differently (and the split values have different meaning). Somehow, both 
> hSplit and vSplit are available before create.

I'm sorry, that bit about FX4Splitter is nonsense.

FX4Splitter has width==1 and height==1 before create, as well.

What I should have said is that FX4Splitter's splitting mechanism 
(proportional rather than based on width) makes this irrelevant to my 
code, which really just wants to set the proportions, and not the widths 
of the children.

I guess FXSplitter (as opp. FX4Splitter) can't work that way because it 
might have >2 children.

So I'll stick with configuring it in #create.

-- 
       vjoel : Joel VanderWerf : path berkeley edu : 510 665 3407


More information about the fxruby-users mailing list