Tcl/Tk Reference Guide
31. Geometry Management
The pack Command
pack [configure] slave [slave ...][options]
Details how slave windows should be managed.
-after sibling -in master -pady pixels
-anchor anchor -ipadx pixels -fill
none|x|y|both
-before sibling -ipady pixels -side top|bottom|left|right
-expand boolean -padx pixels
pack forget slave [slave ...]
Unmanages the given slave windows.
pack info slave
Returns list containing current pack configuration of window slave.
pack propagate master [boolean]
Enables or disables propogation for the window master.
pack slaves master
Returns lists of slaves in the window master.
The place Command
place [configure] window option value [option value ...]
Details how given windows should be managed.
-anchor anchor -relheight size -x location
-height size -relwidth size -y location
-in master -relx location -bordermode
inside|outside|ignore
-width size -rely location
place forget window
Unmanages window.
place info window
Returns list containing current place configuration of window.
place slaves window
Returns lists of slaves in the window master.
The grid Command
grid [configure] slave [slave ...] [option value ...]
-column n -ipady amount -row n
-columnspan n -padx amount -rowspan n
-in other -pady amount -sticky [
n][s][e][w]
-ipadx amount
grid bbox master column row
Returns bounding box in pixels of space occupied by column row.
grid columnconfigure master column [-minsize size][-weight float]
Set/get minimum column size and relative column weight.
grid forget slave [slave ...]
Removes (and unmaps) each slave from grid of its master.
40
Tcl/Tk Reference Guide
8. File Information
file atime fileName
Time fileName was last accessed as seconds since Jan. 1, 1970.
file dirname fileName
Returns all characters in fileName up to but not including last slash.
file executable fileName
Returns 1 if fileName is executable by user, 0 otherwise.
file exists fileName
Returns 1 if fileName exists (and user can read its directory), 0 otherwise.
file extension fileName
Returns all characters in fileName after and including the last dot.
file isdirectory fileName
Returns 1 if fileName is a directory, 0 otherwise.
file isfile fileName
Returns 1 if fileName is a regular file, 0 otherwise.
file join name [name ...]
Joins file names using the correct path separator for the current platform.
file lstat fileName varName
Same as
file stat except uses the lstat kernel call.
file mtime fileName
Time fileName was last modified as seconds since Jan. 1, 1970.
file owned fileName
Returns 1 if fileName owned by the current user, 0 otherwise.
file pathtype fileName
Returns one of
absolute, relative, volumerelative.
file readable fileName
Returns 1 if fileName is readable by current user, 0 otherwise.
file readlink fileName
Returns value of symbolic link given by fileName.
file rootname fileName
Returns all the characters in fileName up to but not including last dot.
file size fileName
Returns size of fileName in bytes.
file split fileName
Returns list whose elements are the path components of fileName.
file stat fileName varName
Place results of stat kernel call on fileName in variable varName as an array
with elements
atime, ctime, dev, gid, ino, mode, mtime, nlink,
size, type, and uid.
file tail fileName
Return all characters in fileName after last slash.
file type fileName
Returns string giving type of fileName. Possible values are
file,
directory, characterSpecial, blockSpecial, fifo, link,or
socket.
file writable fileName
Returns 1 if fileName is writable by current user, 0 otherwise.
5