Ruby Tk --> Window Buttons

Hi @ all!

I don't want the user to maximize the TkRoot - window with the button on
the right side of the window! How can I disable this one? Or how can I
make the size of my window fixed?

Thanks in advance! ALEX

···

--
Posted via http://www.ruby-forum.com/.

I think this is the code example u are looking for

require "tk"
p Tk.root.protocol "WM_DELETE_WINDOW", proc {puts "foo"}
p Tk.root.protocol "WM_TAKE_FOCUS", proc {puts "bar"}
p Tk.root.protocol "WM_DELETE_WINDOW"
p Tk.root.protocol

p Tk.root.protocol "WM_DELETE_WINDOW", ""
p Tk.root.protocol "WM_DELETE_WINDOW"
p Tk.root.protocol
Tk.mainloop

···

On 1/12/06, alexmaster <alexmaster85@web.de> wrote:

Hi @ all!

I don't want the user to maximize the TkRoot - window with the button on
the right side of the window! How can I disable this one? Or how can I
make the size of my window fixed?

Thanks in advance! ALEX

--
Posted via http://www.ruby-forum.com/\.

Message-ID: <0f7971994b95dfbcdb56d960383af850@ruby-forum.com>

I don't want the user to maximize the TkRoot - window with the button on
the right side of the window! How can I disable this one? Or how can I
make the size of my window fixed?

Please try Tk.root.resizable(false, false) or
Tk.root.maxsize(x, y) or both of them.

···

From: alexmaster <alexmaster85@web.de>
Subject: Ruby Tk --> Window Buttons
Date: Fri, 13 Jan 2006 00:15:05 +0900
--
Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)

Hidetoshi NAGAI wrote:

From: alexmaster <alexmaster85@web.de>
Subject: Ruby Tk --> Window Buttons
Date: Fri, 13 Jan 2006 00:15:05 +0900
Message-ID: <0f7971994b95dfbcdb56d960383af850@ruby-forum.com>

I don't want the user to maximize the TkRoot - window with the button on
the right side of the window! How can I disable this one? Or how can I
make the size of my window fixed?

Please try Tk.root.resizable(false, false) or
Tk.root.maxsize(x, y) or both of them.

Thank you very much, Tk.root.resizable(false, false) works!!!!!!

···

--
Posted via http://www.ruby-forum.com/\.