Separator

A themed divider — a thin horizontal or vertical line for visually separating sections of a layout. Separator is themed-only (it has no classic equivalent).

Live preview

Try the Theme switcher in the toolbar — this preview restyles live:

Live preview. In the Player's built-in docs viewer (scriptweaver --help), this renders Separator as a live, theme-aware widget you can interact with.

Example

app.Label({ text: 'Account' }).pack.configure({ anchor: 'w', padx: 12 });

const sep = app.Separator({ orient: 'horizontal' });
sep.pack.configure({ fill: 'x', padx: 12, pady: 8 });

app.Label({ text: 'Preferences' }).pack.configure({ anchor: 'w', padx: 12 });

Use fill: 'x' for a horizontal separator (or fill: 'y' for a vertical one) so it stretches across the available space.

Options

Option Type Description
orient string 'horizontal' (default) or 'vertical' (creation-time only).
style string A ttk style name.

Methods

Separator has no methods of its own; use the inherited widget methods (mainly layout). See Widget basics.

See also