Ruby Tk --> Window Buttons

A

alexmaster

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
 
R

ruby talk

------=_Part_16959_12678638.1137081604709
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

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



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

------=_Part_16959_12678638.1137081604709--
 
H

Hidetoshi NAGAI

From: alexmaster <[email protected]>
Subject: Ruby Tk --> Window Buttons
Date: Fri, 13 Jan 2006 00:15:05 +0900
Message-ID: said:
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.
 
A

alexmaster

Hidetoshi said:
From: alexmaster <[email protected]>
Subject: Ruby Tk --> Window Buttons
Date: Fri, 13 Jan 2006 00:15:05 +0900


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!!!!!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,201
Messages
2,571,052
Members
47,656
Latest member
rickwatson

Latest Threads

Top