-
Notifications
You must be signed in to change notification settings - Fork 4
CTkCard
Rudy edited this page Feb 26, 2024
·
1 revision
# CTkCard
card1 = CTkCard(master=app, border_width=1, corner_radius=5)
card2 = CTkCard(master=app, border_width=1, corner_radius=5)
card3 = CTkCard(master=app, border_width=1, corner_radius=5)
# Create multiple cards
card1.card_1(width=300, height=380, title="Card title", text=TEXT,
button_text="Go somewhere", command=lambda: print("Hello"))
card2.card_2(width=380, height=170, title="Card title", subtitle="Subtitle", text=TEXT, link1_text="Card link1",
link2_text="Card link2", command1=lambda: print("Hello"), command2=lambda: print("Hello"))
card3.card_3(width=600, height=180, header="Header", title="Card title", text=TEXT, button_text="Go somewhere",
command=lambda: print("Hello"))
card1.grid(row=0, column=0, padx=5, pady=20)
card2.grid(row=0, column=1, padx=5, pady=20)
card3.grid(row=0, column=2, padx=5, pady=20)
Parameter | Description |
---|---|
master |
frame master |
border_width |
frame border width (1px: default) |
corner_radius |
frame corner radius (5px: default) |
Parameter | Description |
---|---|
image_path |
Path to the image file |
width |
Width of the card |
height |
Height of the card |
title |
Title of the card |
text |
Text content of the card |
button_text |
Text for the button |
command |
Command to execute when the button is clicked |
Parameter | Description |
---|---|
width |
Width of the card |
height |
Height of the card |
title |
Title of the card |
subtitle |
Subtitle of the card |
text |
Text content of the card |
link1_text |
Text for the first link |
link2_text |
Text for the second link |
command1 |
Command to execute when the first link is clicked |
command2 |
Command to execute when the second link is clicked |
Parameter | Description |
---|---|
width |
Width of the card |
height |
Height of the card |
header |
Header of the card |
title |
Title of the card |
text |
Text content of the card |
button_text |
Text for the button |
command |
Command to execute when the button is clicked |