[fxruby-users] Advanced frame
thom01
thom01 at laposte.net
Fri Feb 24 11:36:44 EST 2006
Hi,
My main window is a vertical frame, it contains an "advanced
button" to display advanced parameters when clicked.
I tried something like that (see below) but it seems the main
window is never resized ?
Thanks
Thomas
---------------------------------
class MyMainWindow < FXMainWindow
attr :advancedFrame
def initialize(app)
super(app, "MyMainWindow")
contents = FXVerticalFrame.new(self,
LAYOUT_FILL_X|LAYOUT_FILL_Y)
advancedButton = FXButton.new(contents, "Advanced >>",
nil, self, 0, FRAME_RAISED|FRAME_THICK)
advancedButton.connect(SEL_COMMAND) do
if @advancedFrame.shown?
self.height -= @advancedFrame.height
@advancedFrame.hide
advancedButton.text = "Advanced >>"
else
self.height += @advancedFrame.height
@advancedFrame.show
advancedButton.text = "<< Basic"
end
self.recalc
end
end
end
#---------------------------
app = FXApp.new
mainWindow = MyMainWindow.new(app)
app.create
mainWindow.advancedFrame.hide
mainWindow.height -= mainWindow.advancedFrame.height
mainWindow.show(PLACEMENT_SCREEN)
app.run
Accédez au courrier électronique de La Poste : www.laposte.net ;
3615 LAPOSTENET (0,34 /mn) ; tél : 08 92 68 13 50 (0,34/mn)
More information about the fxruby-users
mailing list