updated documentation

This commit is contained in:
Tom Schimansky 2021-12-04 12:54:57 +01:00
parent e6d71058aa
commit 61eba796fa
5 changed files with 35 additions and 8 deletions

View File

@ -116,7 +116,7 @@ colors and removed the round corners, and added a border to the buttons:
![](documentation_images/complex_example_other_style.png)
### Customtkinter on Windows/Linux
### CustomTkinter on Windows/Linux
All elements of Customtkinter are drawn on the ```tkinter.Canvas```.
But the Tkinter canvas supports antialiasing only on macOS, so on Windows
@ -226,6 +226,16 @@ fg_color | forground color, tuple: (light_color, dark_color) or single color
bg_color | background color, tuple: (light_color, dark_color) or single color, None for transparent bg
text_color | label text color, tuple: (light_color, dark_color) or single color
text_font | label text font, tuple: (font_name, size)
CTkLabel Methods:
```python
CTkLabel.configure(text=new_text)
CTkLabel.configure(fg_color=new_fg_color,
bg_color=new_bg_color,
text_color=new_text_color)
```
</details>
### CTkEntry
@ -252,6 +262,15 @@ fg_color | forground color, tuple: (light_color, dark_color) or single color
bg_color | background color, tuple: (light_color, dark_color) or single color
text_color | entry text color, tuple: (light_color, dark_color) or single color
text_font | entry text font, tuple: (font_name, size)
CTkEntry Methods:
```python
CTkEntry.delete(...) # standard tkinter Entry...
CTkEntry.insert(...)
text = CTkEntry.get()
```
</details>
### CTkCheckBox
@ -332,6 +351,13 @@ bg_color | background color, tuple: (light_color, dark_color) or single color
border_color | slider border color, normally transparent (None)
button_color | color of the slider button, tuple: (light_color, dark_color) or single color
button_hover_color | hover color, tuple: (light_color, dark_color) or single color
CTkSlider Methods:
```python
value = CTkSlider.get()
CTkSlider.set(value)
```
</details>
### CTkProgressBar

View File

@ -1,4 +1,4 @@
__version__ = "1.3"
__version__ = "1.4"
from .customtkinter_button import CTkButton
from .customtkinter_slider import CTkSlider

View File

@ -19,7 +19,7 @@ class CTkSlider(tkinter.Frame):
to=1,
width=160,
height=16,
border_width=5.5,
border_width=5,
command=None,
*args, **kwargs):
super().__init__(*args, **kwargs)

View File

@ -142,7 +142,7 @@ class App(tkinter.Tk):
corner_radius=8)
self.button_5.place(relx=0.66, rely=0.92, anchor=tkinter.CENTER)
#self.progressbar.set(0.65)
self.progressbar.set(0.65)
def button_event(self):
print("Button pressed")

View File

@ -4,9 +4,10 @@ import os
# Update on pypi:
#
# 1. delete old /dist
# 2. python3 -m pip install --upgrade build
# 3. python3 -m build
# 4. python3 -m twine upload dist/*
# 2 increase both version numbers
# 3. python -m pip install --upgrade build
# 4. python -m build
# 5. python -m twine upload dist/*
#
@ -18,7 +19,7 @@ def read(filename):
setup(name="customtkinter",
version="1.3",
version="1.4",
author="Tom Schimansky",
license="Creative Commons Zero v1.0 Universal",
url="https://github.com/TomSchimansky/CustomTkinter",