TkFrame
The classic Tk frame. As a container it behaves exactly like
Frame, but it is not themed: it takes a direct background
colour (plus relief, borderWidth, …) that the themed Frame does not
expose. Reach for it when you need a solid block of a specific colour — a
coloured panel, a divider strip, a canvas backdrop — rather than a
theme-following surface.
Example
const swatch = app.TkFrame({ background: '#3b82f6', width: 64, height: 64 });
swatch.pack.configure({ padx: 8, pady: 8 });
Like Frame, it is a
container: build children with
its factory methods and lay them out inside it.
Options
| Option | Type | Description |
|---|---|---|
background |
string | Fill colour ('#rrggbb' or a Tk colour name). The themed Frame has no background. |
borderWidth |
number | Border thickness. |
relief |
string | Border style: 'flat', 'groove', 'raised', 'sunken', 'ridge'. |
padX / padY |
number | Inner horizontal / vertical padding. |
highlightThickness |
number | Focus-highlight border width. |
width / height |
number | Requested size in pixels. |
(The themed Frame's padding and style options are ttk-only and do not
apply here; classic Tk uses padX / padY.)
Methods
TkFrame has no commands of its own; use the inherited widget methods plus the
container factory methods. See Widget basics.