Giter Site home page Giter Site logo

siliconlife / ttkbootstrap Goto Github PK

View Code? Open in Web Editor NEW

This project forked from israel-dryer/ttkbootstrap

0.0 0.0 0.0 42.9 MB

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.

License: MIT License

Python 99.97% Batchfile 0.03%

ttkbootstrap's Introduction

Downloads Downloads

ttkbootstrap

English | δΈ­ζ–‡

A supercharged theme extension for tkinter that enables on-demand modern flat style themes inspired by Bootstrap.

πŸ‘€ Check out the documentation.

1.0+ is a complete rebuild of the library. If you are using version 0.5 you may run into issues trying to import themes with the themes.json as this has been removed from 1.0. You can now import and save themes directly using the ttkcreator.

Features

βœ”οΈ Built-in Themes
Over a dozen curated dark and light themes.

βœ”οΈ Pre-defined Styles:
Loads of beautiful pre-defined widget styles such as outline and round toggle buttons.

βœ”οΈ Simple keyword API:
Apply colors and types using simple keywords such as primary and striped instead of the legacy approach of primary.Striped.Horizontal.TProgressbar. If you've used Bootstrap for web development, you are already familiar with this approach using css classes.

βœ”οΈ Lots of new Widgets:
ttkbootstrap comes with several new beautifully designed widgets such as Meter, DateEntry, and Floodgauge. Additionally, dialogs are now themed and fully customizable.

βœ”οΈ Built-in Theme Creator:
Want to create your own theme? Easy! ttkboostrap includes a built-in theme creator that enables you to easily build, load, expore, and apply your own custom themes.

Installation

python -m pip install ttkbootstrap

Simple Usage

Instead of using long, complicated ttk style classes, you can use simple keywords with the "bootstyle" parameter.

import ttkbootstrap as ttk
from ttkbootstrap.constants import *

root = ttk.Window(themename="superhero")

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

b2 = ttk.Button(root, text="Submit", bootstyle="info-outline")
b2.pack(side=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")
  • bootstyle=(INFO, OUTLINE)

Links

ttkbootstrap's People

Contributors

israel-dryer avatar daniils avatar antrrax avatar newbiexvwu avatar 745404527 avatar jongbatax avatar alejandroautalan avatar heribert17 avatar intellbg avatar bigoulours avatar bszollosinagy avatar raylemon avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.