-
-
Notifications
You must be signed in to change notification settings - Fork 0
CTk Button
Lasha Kandelaki edited this page May 7, 2026
·
2 revisions
Clickable button with rounded corners, hover/pressed states, optional border, and text + icon composition.
Wraps customtkinter.CTkButton.
| Group | Properties |
|---|---|
| Geometry |
x, y, width, height
|
| Rectangle |
corner_radius, border_width, border_color
|
| Interaction |
state, command
|
| Colors |
fg_color, hover_color, text_color, text_color_disabled
|
| Text |
text, font
|
| Icon |
image, compound, image_padding
|
| Alignment | anchor |
Exact set comes from the descriptor in
app/widgets/ctk_button.py.
Slides from 0 (rectangle) to min(width, height) // 2 (circle when
square, pill when not).
-
60×60+corner_radius=30→ circle (calculator key) -
200×40+corner_radius=20→ pill (action button) - Circles side-by-side: keep
gap≥ 6 px (DPI scaling otherwise eats the space between them)
CTkMaker exports a patched CTkButton so rounded buttons keep the
exact width × height you set. The patched class is inlined into the
generated .py — no extra dependencies.
Watch out: long text on a small round button overflows visually into the corner area. Reduce
font_sizeor widen the button.
See also — Widgets · CTkSegmentedButton · CustomTkinter docs