Skip to content

CTk Button

Lasha Kandelaki edited this page May 7, 2026 · 2 revisions

CTkButton

Clickable button with rounded corners, hover/pressed states, optional border, and text + icon composition.

Wraps customtkinter.CTkButton.

Properties

Groups appear in the panel in Content → Layout → Visual → Behavior order.

Group Properties
Text text, font, alignment, text_color, text_color_disabled
Icon image, size, tint, compound, preserve aspect
Geometry x, y, width, height
Rectangle corner_radius, border_width, border_color
Main Colors fg_color, hover_color
Button Interaction state, hover effect, command

Exact set comes from the descriptor in app/widgets/ctk_button.py.

Corner Radius

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_size or widen the button.


See alsoWidgets · CTkSegmentedButton · CustomTkinter docs

Clone this wiki locally