W3cubDocs

/Tcl/Tk

ttk_sizegrip

NAME
ttk::sizegrip — Bottom-right corner resize widget
SYNOPSIS
DESCRIPTION
STANDARD OPTIONS
-class, undefined, undefined
-cursor, cursor, Cursor
-state, state, State
-style, style, Style
-takefocus, takeFocus, TakeFocus
WIDGET COMMAND
PLATFORM-SPECIFIC NOTES
EXAMPLES
BUGS
SEE ALSO
KEYWORDS

Name

ttk::sizegrip — Bottom-right corner resize widget

Synopsis

ttk::sizegrip pathName ?options?

Description

A ttk::sizegrip widget (also known as a grow box) allows the user to resize the containing toplevel window by pressing and dragging the grip.

Standard options

-class, undefined, undefined
-cursor, cursor, Cursor
-state, state, State
-style, style, Style
-takefocus, takeFocus, TakeFocus

Widget command

Sizegrip widgets support the standard cget, configure, identify, instate, and state methods. No other widget methods are used.

Platform-specific notes

On Mac OSX, toplevel windows automatically include a built-in size grip by default. Adding a ttk::sizegrip there is harmless, since the built-in grip will just mask the widget.

Examples

Using pack:
pack [ttk::frame $top.statusbar] -side bottom -fill x
pack [ttk::sizegrip $top.statusbar.grip] -side right -anchor se

Using grid:

grid [ttk::sizegrip $top.statusbar.grip] \
    -row $lastRow -column $lastColumn -sticky se
# ... optional: add vertical scrollbar in $lastColumn,
# ... optional: add horizontal scrollbar in $lastRow

Bugs

If the containing toplevel's position was specified relative to the right or bottom of the screen (e.g., “wm geometry ... wxh-x-y” instead of “wm geometry ... wxh+x+y”), the sizegrip widget will not resize the window.

ttk::sizegrip widgets only support “southeast” resizing.

See also

ttk::widget

Copyright © 2006 Joe English