Skip to content

Window Properties

Lasha Kandelaki edited this page May 19, 2026 · 4 revisions

Window / Dialog Properties

Edit the active form's settings — geometry, behaviour, builder grid, accent — without leaving the canvas.

Open

Right-click the empty canvas → Window/Dialog Properties (last entry, label flips between Window and Dialog depending on the form). The Properties panel switches to the document.

Properties

Group Properties
Geometry width, height
Behaviour resizable_x, resizable_y, frameless
Builder Grid grid_style (none / dots / lines), grid_color, grid_spacing
Snap & Alignment alignment_lines_enabled, snap_enabled
Main Colors fg_color
Marker accent_color

Description, Local Variables, Object References and Attached Scripts surface as their own groups (see below) — they're not part of the property schema.

Behaviour

Toggle Effect
resizable_x Allow the user to resize the window horizontally
resizable_y Allow the user to resize the window vertically
frameless Hide native window chrome — overrideredirect(True) on export

Builder Grid

A design-time helper that draws an alignment grid behind the canvas. Builder-only — never makes it into the exported .py. Each form carries its own style, colour and spacing.

Style Effect
none No grid
dots Dot grid (default)
lines Solid grid lines

Snap & Alignment

Both toggles are per-document — each form keeps its own preference.

Toggle What it controls
snap_enabled Magnetic stop when a widget edge nears another widget / margin during drag
alignment_lines_enabled Blue guide lines drawn while dragging to show shared edges

Disable either one if you need to place a widget at an exact pixel that the snap would round away from.

Marker (accent color)

Each form gets an accent colour used in the Forms tab strip and Object Tree. None falls back to a palette-cycled colour.

Description

A free-form note about the form. The exporter writes it as a comment above the generated class X(ctk.CTk): block — useful when feeding the exported file to an AI assistant that needs to know what the screen is for.

Local Variables group

A read-only group surfaces every Variables declared on the form. Each row gets a dim 3-letter chip next to the name showing the variable's type:

Chip Type
col color (also renders a real-hue swatch next to the hex value)
str string
int integer
flt float
bol boolean

Right-click → Open Variables window… jumps to the right tab and selects the entry.

Object References group

A flat read-only group surfaces every Object References visible from this window — both the form's local widget refs and every project-level global ref pointing at any window in the project.

Each row gets a 3-letter type chip next to the ref name so you can scan at a glance:

Chip Target
Win Main Window
Dlg Dialog (Toplevel)
Btn CTkButton
Lbl CTkLabel
Ent CTkEntry
Frm CTkFrame
one chip per widget type
Interaction Effect
Double-click a Win / Dlg row Switches the canvas to that document — useful for jumping to the target of a global ref.
Right-click → Open Same as double-click.
Right-click → Open Variables window… Jumps to the Object References tab and selects the ref.

The current window's own global ref entry does not appear in this list — the Window-Global Reference toggle row at the top of the panel already surfaces it.

Attached Scripts group

A read-only group lists every library script attached to this window. Attaching makes the module available to the window's Event Handlers picker under the Library category, and triggers a matching from . import <module> on export.

Button Action
+ (group header) Opens the [[Scripts Panel
× (per row) Detaches the module from this window. The file stays on disk — only the window's attached_scripts list loses the entry.

Detach is path-as-identity: every event binding on this window that referenced a function in the detached module becomes a missing-target warning and needs re-picking.


See alsoWindows and Dialogs · Variables · Object References · Scripts Panel · Event Handlers · Canvas Workspace

Clone this wiki locally