Name

frame

frame pathName [option value...]

The frame command creates a new frame widget named pathName. The main purpose of a frame widget is to serve as a container for laying out other widgets using one of Tk’s geometry managers.

Standard Options

-borderwidth

-cursor

-highlightbackground

-highlightcolor

-highlightthickness

-relief

-takefocus

  

Widget-Specific Options

-background color (background, Background)

Same as standard option, but may be the empty string to display no background or border.

-class name (class, Class)

Class to use when querying the option database and for bindings. May not be changed with configure.

-colormap colormap (colormap, Colormap)

Color map to use for window. Colormap may be either new, in which case a new colormap is created, or the name of another window, in which case that window’s colormap is used. The default is to use the colormap of its parent. May not be changed with configure.

-container boolean (container, Container)

Whether the window will be used as a container in which to embed some other application. May not be changed with configure.

-height height (height, Height)

Desired height, in screen units, for the window.

-visual visual (visual, Visual)

Visual class to use for the window. Visual must be directcolor, grayscale, pseudocolor, staticcolor, staticgray, or truecolor.

-width width (width, Width)

Desired width, in screen units, for the window.

Get Tcl/Tk in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.