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)