Skip to content

Latest commit

 

History

History
44 lines (32 loc) · 1.28 KB

README.md

File metadata and controls

44 lines (32 loc) · 1.28 KB

ttkbootstrap

A collection of modern flat themes inspired by Bootstrap.

Check out the documentation under development.

Installation

Version 1.0 is currently unpublished; for the moment you must install from source.

python -m pip install git+https://github.com/israel-dryer/ttkbootstrap

Version 0.5 is currently on PyPI.

pip install ttkbootstrap

Simple Usage

The new Version 1.0 API adds style keywords. Instead of using style="info.Outline.TButton", you can use info-outline to create an info colored outline button.

import tkinter as tk
import ttkbootstrap as ttk

root = tk.Tk()
style = ttk.Style()

b1 = ttk.Button(root, text="Submit", bootstyle='success')
b1.pack(side=tk.LEFT, padx=5, pady=10)

b2 = ttk.Button(root, text="Submit", bootstyle='info-outline')
b2.pack(side=tk.LEFT, padx=5, pady=10)

root.mainloop()

The new keyword API is very flexible. The following examples all produce the same result:

  • bootstyle="info-outline"
  • bootstyle="info outline"
  • bootstyle=("info", "outline")