[fxruby-users] Q about combining behaviour of foursplit.rb and shutter.rb
lyle at knology.net
lyle at knology.net
Mon Jun 5 16:24:21 EDT 2006
On Mon, 05 Jun 2006 22:14:05 +0200, Axel Etzold <AEtzold at gmx.de> wrote :
> So far, I've tried to change the {}-block of the ShutterButtons
> to achieve that:
>
> shutterItem = ShutterItem.new(@shutter, "Files, data, and pictures",
nil, LAYOUT_FILL_Y)
> ShutterButton.new(shutterItem.content, "Expand dirlist",
fatBot).connect(SEL_COMMAND) { FX4Splitter::ID_EXPAND_TOPLEFT}
> ShutterButton.new(shutterItem.content, "Expand cell file editor",
angryGuy).connect(SEL_COMMAND) { FX4Splitter::ID_EXPAND_BOTTOMLEFT}
> ShutterButton.new(shutterItem.content, "Expand tuning curve plot",
sawBlade).connect(SEL_COMMAND) { FX4Splitter::ID_EXPAND_TOPRIGHT}
> ShutterButton.new(shutterItem.content, "Expand reconstruction plot",
redMacOS).connect(SEL_COMMAND) {FX4Splitter::ID_EXPAND_BOTTOMRIGHT}
> ShutterButton.new(shutterItem.content, "Show all four",
redMacOS).connect(SEL_COMMAND) { FX4Splitter::ID_EXPAND_ALL }
>
> But nothing happens.
> What should I do ?
Well, your message-handler blocks don't *do* anything (other than evaluate
the value of a constant like FX4Splitter::ID_EXPAND_TOPLEFT).
I think you want to modify them to call a function on the splitter, for example:
ShutterButton.new(shutterItem.content,
"Expand dirlist",
fatBot).connect(SEL_COMMAND) {
four_splitter.expanded = FX4Splitter::ExpandTopLeft
}
Hope this helps,
Lyle
More information about the fxruby-users
mailing list