Maximize window in FXRuby

With the following statement, I can create a window, and control its
absolute placement and absolute size on my screen. But I don’t want to
control it like this. I want to simply create the window, and send it a
"maximize window" message, having the window manager tell the application
how big it should make its window and where to put the upper left corner.

@app = Fox::FXApp.new()
Fox::FXMainWindow.new(@app, “FoxApp”, nil, nil, Fox::DECOR_ALL,
0, 0, 640, 640, 0, 0)

Anybody know how to do this? I am using GNOME2 on Linux, but would hope
that any solution would also work on Windows… can I somehow send a
message to the window that mimics a user clicking the maximize button?

Thanks in advance.

-michael

Michael C. Libby wrote:

With the following statement, I can create a window, and control its
absolute placement and absolute size on my screen. But I don’t want to
control it like this. I want to simply create the window, and send it a
“maximize window” message, having the window manager tell the application
how big it should make its window and where to put the upper left corner.

Try using the FXMainWindow#place method:

 theMainWindow.place(PLACEMENT_MAXIMIZED)

Hope this helps,

Lyle