Modern Buttons In CustomTkinter - Tkinter CustomTkinter 2

In this video I'll show you how to use buttons in Custom Tkinter.
Buttons in CustomTkinter are quite a bit different than in regular Tkinter.
You have many more attributes that allow you to customize the button in many way, and we'll talk about all of them in this video.
#tkinter #codemy #JohnElder
Timecodes
0:00​​ - Introduction
1:30 - Create a CustomTkinter Button
2:54 - Make Button Clickable
4:27 - Get Button Text
5:15 - Change Height and Width of Button
5:57 - Change Button Font
6:22 - Change Button Text Color
6:54 - Change Button Background Color
7:28 - Change Button Hover Color
7:49 - Change Button Radius
8:22 - Change Button Transparency BG Color
9:05 - Change Button Border
9:28 - Change Button Border Color
9:55 - Change Button State To Disabled
10:16 - Change Button State To Normal
10:29 - Conclusion

Пікірлер: 49

  • @TkinterPython
    @TkinterPython11 ай бұрын

    ▶ Watch CustomTkinter Playlist ✅ FREE Tkinter Widget Book bit.ly/45iO4OP bit.ly/3K4qlZC ▶ See More At: ✅ Subscribe To My KZread Channel: Tkinter.com bit.ly/3Pk1By4 ▶ MASSIVE TKINTER.COM DISCOUNT ✅ Join My Facebook Group: 30% off with coupon code: youtube bit.ly/2GFmOBz ▶ Get The Code For This Video bit.ly/3dCzz2K

  • @user-vz4mh3zd1f
    @user-vz4mh3zd1f8 ай бұрын

    Thank you, sir!

  • @TkinterPython

    @TkinterPython

    8 ай бұрын

    Welcome!

  • @figennurulusal2587
    @figennurulusal25877 ай бұрын

    Is there a "wraplength" or such for customtkinter? the size of text on my buttons messes up the size of the button even though I do put width and height at a certain number.

  • @sovereignlivingsoul
    @sovereignlivingsoul4 ай бұрын

    i'm going to binge watch your playlist, you have great presentation, i suggest not apologizing as often, i think people enjoy your designs, regardless of their ocular enhancements

  • @TkinterPython

    @TkinterPython

    4 ай бұрын

    🙂

  • @ssukhdipmanku408
    @ssukhdipmanku40811 ай бұрын

    Excellent way of explaining

  • @TkinterPython

    @TkinterPython

    11 ай бұрын

    Thanks!

  • @thangabalur8612
    @thangabalur86122 ай бұрын

    Can you implement drag and drop buttons

  • @devabdul
    @devabdul11 ай бұрын

    Sir i have question, how i create one file with bg, font size etc designing part for all my buttons?

  • @bluewhale656
    @bluewhale6567 күн бұрын

    I have a quick question about tkinter buttons: If I use a png image for the button, will the button only activate if I click on the opaque pixels or will it also activate if I click on transparent pixels?

  • @evaneoskowar8859
    @evaneoskowar88592 ай бұрын

    is there a technical way to add button with like multicolor/rainbow borders like website does?

  • @Codemycom

    @Codemycom

    2 ай бұрын

    not unless you use an image

  • @MysteryMindset636
    @MysteryMindset6369 ай бұрын

    please upload more vedios on this topic custom tkinter

  • @TkinterPython

    @TkinterPython

    9 ай бұрын

    There's an entire playlist, you're on video 2

  • @SuperLimeWorld
    @SuperLimeWorld5 ай бұрын

    When I click a button it runs the "command" twice, Eg. if you have a function that prints ("h") and run it with the button, it will print("h") twice.

  • @TkinterPython

    @TkinterPython

    5 ай бұрын

    You did something different from the video then

  • @YinjinChen
    @YinjinChen4 ай бұрын

    Sir, how to make button recognize different kinds of clicking? Like responding in different ways when users rightclick and leftclick.

  • @TkinterPython

    @TkinterPython

    4 ай бұрын

    Use binding

  • @BillyHau
    @BillyHau6 ай бұрын

    is there a way to bind a button released command?

  • @TkinterPython

    @TkinterPython

    6 ай бұрын

    Sure

  • @Heroes_Academy1
    @Heroes_Academy111 ай бұрын

    I have a question is there a spin box in Ctk

  • @TkinterPython

    @TkinterPython

    11 ай бұрын

    I don't think so

  • @nikhilnarsipalli9694
    @nikhilnarsipalli96948 ай бұрын

    I have a question, how can we enable button border only when hovered upon

  • @TkinterPython

    @TkinterPython

    8 ай бұрын

    Use the hover_color attribute

  • @AhmedAl-Yousofi
    @AhmedAl-Yousofi9 ай бұрын

    How to keep the state of the button to disabled until the entry ( input ) is filled by some text, then change it to normal ?

  • @TkinterPython

    @TkinterPython

    9 ай бұрын

    use a binding on the entry box to run a function that changes the button state

  • @joeb3045
    @joeb30454 ай бұрын

    Hi, is it possible to pass an argument to the function, that is called with command?

  • @TkinterPython

    @TkinterPython

    4 ай бұрын

    yes, using lambdas. command=lambda: whatever(thing)

  • @reo22650
    @reo226503 ай бұрын

    for some reason when I use root.geometry("650, 300") It doesnt change the size or anything

  • @TkinterPython

    @TkinterPython

    3 ай бұрын

    Because that's not how you do it. root.geometry('650x300') not ('650, 300')

  • @rgmtb
    @rgmtb7 ай бұрын

    These videos are terrific! I'm new to tk everything (haha). There seems to be, Tk Ttk Ttkbootstrap And now custom tkinter What should I focus on? Custom tkinter seems very flexible so I thought I might as well just focus on the latest and greatest. Your thoughts?

  • @TkinterPython

    @TkinterPython

    7 ай бұрын

    Doesn't really matter... start with whatever grabs your fancy

  • @mouazalbitar6174
    @mouazalbitar61743 ай бұрын

    My mouse cursor does not change when I click on the button. Please help

  • @TkinterPython

    @TkinterPython

    3 ай бұрын

    help with what? Is that a problem?

  • @jasmine2258
    @jasmine22587 ай бұрын

    can we disabled the background of the button??

  • @TkinterPython

    @TkinterPython

    7 ай бұрын

    Sorry, don't know what you mean

  • @DRKLRD-kv4cm

    @DRKLRD-kv4cm

    3 ай бұрын

    @@TkinterPython i think he probably, just like me, wants to know whether it's possible to make the background of the button TRULY TRANSPARENT. Because, as long as you use a fixed colour for the background frame/window, it works fine, but when you put an image on the background, the 4 corners of the button appear, white, and are not transparent at all. I would like to know that as well, if you happen to know

  • @lucachristian2305
    @lucachristian23057 ай бұрын

    how to import custom fonts ?

  • @TkinterPython

    @TkinterPython

    7 ай бұрын

    I think there's a video on the channel about that

  • @Gengar7656
    @Gengar76562 ай бұрын

    Hey great video! Is there a difference between CTkButton und customtkinter.CTkButton ? I have always been using the first syntax and thaught its the same

  • @TkinterPython

    @TkinterPython

    2 ай бұрын

    it's the same, it just depends on how you imported it, which syntax you use.

  • @Koinonia-kt5mb
    @Koinonia-kt5mb5 ай бұрын

    Why does ctk don't have messagebox?

  • @TkinterPython

    @TkinterPython

    5 ай бұрын

    Because the guy who created it didn't put one in.

  • @Koinonia-kt5mb

    @Koinonia-kt5mb

    5 ай бұрын

    @@TkinterPython so is there any other opinion other than messagebox?

  • @TkinterPython

    @TkinterPython

    5 ай бұрын

    @@Koinonia-kt5mbSure, depending on what you mean by messagebox and what you need it to do. You can always just create a new tkinter toplevel window.

  • @larslover6559

    @larslover6559

    2 ай бұрын

    @@Koinonia-kt5mb You can still use the message box in regular tkinter.. if you have many windows put in parent=(your present window). so that the messagebox opens at the right window

  • @Test-xn9jq
    @Test-xn9jq24 күн бұрын

    Your real name is John Eldor?

  • @TkinterPython

    @TkinterPython

    16 күн бұрын

    John Elder