From: Axel Date: 2010-02-03T21:10:18+09:00 Subject: Re: TK: Get the "usable" screensize"? Hello Hidetoshi Nagai, it works, thank you! > root = Tk.root > root.state(:zoomed) > Tk.update > root.geometry =~ /(\d+)x(\d+)\+([+-]?\d+)\+([+-]?\d)/ > w = $1.to_i > h = $2.to_i > x = $3.to_i > y = $4.to_i > sw = root.winfo_screenwidth > sh = root.winfo_screenheight > rx = root.winfo_rootx > ry = root.winfo_rooty # maybe, taskbar height > usable_screenwidth = w + rx * 2 # maybe, x_border * 2 > usable_screenheight = h + ry > taskbar_height = sh - usable_screenheight I didn't know that TkRoot#geometry exists and that it gives another result than TkRoot.winfo_geometry. At present, when I look for documentation of Ruby/Tk-methods, I look into the TCL/TK documentation, e.g, for #winfo_geometry I look into: http://www.tcl.tk/man/tcl8.5/TkCmd/winfo.htm#M15 Where must I look up methods of TkRoot, for example TkRoot.geometry? In TCL-WM? http://www.tcl.tk/man/tcl8.5/TkCmd/wm.htm#M28 ? Axel