add example images
@ -1,5 +1,3 @@
|
|||||||
import tkinter
|
|
||||||
|
|
||||||
import customtkinter
|
import customtkinter
|
||||||
import os
|
import os
|
||||||
from PIL import Image
|
from PIL import Image
|
||||||
@ -17,7 +15,7 @@ class App(customtkinter.CTk):
|
|||||||
self.grid_columnconfigure(1, weight=1)
|
self.grid_columnconfigure(1, weight=1)
|
||||||
|
|
||||||
# load images with light and dark mode image
|
# load images with light and dark mode image
|
||||||
image_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "../test/manual_integration_tests/test_images")
|
image_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "test_images")
|
||||||
self.logo_image = customtkinter.CTkImage(Image.open(os.path.join(image_path, "CustomTkinter_logo_single.png")), size=(26, 26))
|
self.logo_image = customtkinter.CTkImage(Image.open(os.path.join(image_path, "CustomTkinter_logo_single.png")), size=(26, 26))
|
||||||
self.large_test_image = customtkinter.CTkImage(Image.open(os.path.join(image_path, "large_test_image.png")), size=(500, 150))
|
self.large_test_image = customtkinter.CTkImage(Image.open(os.path.join(image_path, "large_test_image.png")), size=(500, 150))
|
||||||
self.image_icon_image = customtkinter.CTkImage(Image.open(os.path.join(image_path, "image_icon_light.png")), size=(20, 20))
|
self.image_icon_image = customtkinter.CTkImage(Image.open(os.path.join(image_path, "image_icon_light.png")), size=(20, 20))
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
import tkinter
|
|
||||||
import customtkinter
|
import customtkinter
|
||||||
|
|
||||||
customtkinter.set_appearance_mode("dark") # Modes: "System" (standard), "Dark", "Light"
|
customtkinter.set_appearance_mode("dark") # Modes: "System" (standard), "Dark", "Light"
|
||||||
@ -8,7 +7,6 @@ app = customtkinter.CTk()
|
|||||||
app.geometry("400x780")
|
app.geometry("400x780")
|
||||||
app.title("CustomTkinter simple_example.py")
|
app.title("CustomTkinter simple_example.py")
|
||||||
|
|
||||||
|
|
||||||
def button_callback():
|
def button_callback():
|
||||||
print("Button click", combobox_1.get())
|
print("Button click", combobox_1.get())
|
||||||
|
|
||||||
@ -20,7 +18,7 @@ def slider_callback(value):
|
|||||||
frame_1 = customtkinter.CTkFrame(master=app)
|
frame_1 = customtkinter.CTkFrame(master=app)
|
||||||
frame_1.pack(pady=20, padx=60, fill="both", expand=True)
|
frame_1.pack(pady=20, padx=60, fill="both", expand=True)
|
||||||
|
|
||||||
label_1 = customtkinter.CTkLabel(master=frame_1, justify=tkinter.LEFT)
|
label_1 = customtkinter.CTkLabel(master=frame_1, justify=customtkinter.LEFT)
|
||||||
label_1.pack(pady=10, padx=10)
|
label_1.pack(pady=10, padx=10)
|
||||||
|
|
||||||
progressbar_1 = customtkinter.CTkProgressBar(master=frame_1)
|
progressbar_1 = customtkinter.CTkProgressBar(master=frame_1)
|
||||||
@ -47,7 +45,7 @@ combobox_1.set("CTkComboBox")
|
|||||||
checkbox_1 = customtkinter.CTkCheckBox(master=frame_1)
|
checkbox_1 = customtkinter.CTkCheckBox(master=frame_1)
|
||||||
checkbox_1.pack(pady=10, padx=10)
|
checkbox_1.pack(pady=10, padx=10)
|
||||||
|
|
||||||
radiobutton_var = tkinter.IntVar(value=1)
|
radiobutton_var = customtkinter.IntVar(value=1)
|
||||||
|
|
||||||
radiobutton_1 = customtkinter.CTkRadioButton(master=frame_1, variable=radiobutton_var, value=1)
|
radiobutton_1 = customtkinter.CTkRadioButton(master=frame_1, variable=radiobutton_var, value=1)
|
||||||
radiobutton_1.pack(pady=10, padx=10)
|
radiobutton_1.pack(pady=10, padx=10)
|
||||||
|
BIN
examples/test_images/CustomTkinter_logo_single.png
Normal file
After Width: | Height: | Size: 198 KiB |
BIN
examples/test_images/add_user_dark.png
Normal file
After Width: | Height: | Size: 7.3 KiB |
BIN
examples/test_images/add_user_light.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
examples/test_images/bg_gradient.jpg
Normal file
After Width: | Height: | Size: 885 KiB |
BIN
examples/test_images/chat_dark.png
Normal file
After Width: | Height: | Size: 9.2 KiB |
BIN
examples/test_images/chat_light.png
Normal file
After Width: | Height: | Size: 7.7 KiB |
BIN
examples/test_images/home_dark.png
Normal file
After Width: | Height: | Size: 7.0 KiB |
BIN
examples/test_images/home_light.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
examples/test_images/image_icon_light.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
examples/test_images/large_test_image.png
Normal file
After Width: | Height: | Size: 3.3 MiB |