An introduction to customtkinter [way better styling in tkinter]

Поділитися
Вставка
  • Опубліковано 15 жов 2024
  • This video will cover how to use customtkinter, which is an infinitely better way to style tkinter apps.
    You can get the code here:
    github.com/cle...

КОМЕНТАРІ • 54

  • @danilodelucio
    @danilodelucio Рік тому +18

    This is the most complete Custom Tkinter content. I didn't know it was so customizable, thanks so much for sharing it! 🙏

    • @SabinPoudel
      @SabinPoudel Рік тому

      Check out
      Expense tracker Customtkinter project (modern GUI)
      ua-cam.com/video/1p_Y_QB3c1A/v-deo.htmlsi=V0XgF8VZvO5CUxsD

  • @Mark-yg8oe
    @Mark-yg8oe 3 місяці тому

    Awesome tutorial!!! Is there a way to change the window image next to the window title?

  • @xzex2609
    @xzex2609 Рік тому +5

    The best way of learning CustomTkinter is that you turn all of your ugly tkinter projects into ctk ,, and some parameters has a different name ie in Buttun you have not bg= instead you have fg_color ,, this way your entire time will concentraited on just working with UI not the logic of the Program,
    But someone got to make something Like QT Designer , and you work your project like VISUAL C++ , you just drag and drop your elements ( pyqt has this option but its not like visual C) I mean the free version

  • @DPoly
    @DPoly Рік тому +4

    Thanks for the tutorials.
    Are you going to make some projects , using all this goodies, too?
    Happy new year!

  • @gregcrawford6059
    @gregcrawford6059 5 місяців тому +1

    Good tutorials.
    But how do you get rounded corners on the widgets without seeing the white background.
    With windows 10 I only see the full affect of rounded corners when appearance is set to light. When it's dark then the widgets always show the corners as white.

  • @sonu-jangir
    @sonu-jangir Рік тому +1

    Thank you so much sir for your all awesome videos...❤🎉

  • @Lusanri
    @Lusanri Рік тому +1

    Can you explain how to create a table viewer? The project creator haven't created this widget till now (2023/02/23)

  • @rafortwalfer
    @rafortwalfer 8 місяців тому +1

    Bro! do you know How to set Favicon at place of CTkinter logo

  • @RFBPekopon
    @RFBPekopon 8 місяців тому

    where was the api for CTk that you were showing?

  • @gilleslejeune6823
    @gilleslejeune6823 Рік тому

    Thanks, but in customtkinter there is no treeview and listbox ?

  • @SouthSaharaMedia
    @SouthSaharaMedia Рік тому +1

    wow ... this was easier to understand

    • @SabinPoudel
      @SabinPoudel Рік тому

      Check out
      Expense tracker Customtkinter project (modern GUI)
      ua-cam.com/video/1p_Y_QB3c1A/v-deo.htmlsi=V0XgF8VZvO5CUxsD

  • @samarthvyas8234
    @samarthvyas8234 11 місяців тому

    how can we change icon in Customtkinter??

  • @pilyotuts
    @pilyotuts 10 місяців тому

    theres no labelframe?

  • @Nestorhnz
    @Nestorhnz 10 місяців тому

    Great tutorial bro, thanks

  • @c-ronos
    @c-ronos 4 місяці тому

    great tutorial.

  • @PANDURANG99
    @PANDURANG99 Рік тому

    It hangs, if we minimise and maximize frames

  • @rupaksaha9050
    @rupaksaha9050 Рік тому +1

    My window isn't black, even if I use .configure

  • @manarmimi3073
    @manarmimi3073 Рік тому +1

    👌👌👌, Good job .

    • @SabinPoudel
      @SabinPoudel Рік тому

      Check out
      Expense tracker Customtkinter project (modern GUI)
      ua-cam.com/video/1p_Y_QB3c1A/v-deo.htmlsi=V0XgF8VZvO5CUxsD

  • @dheerparekh1305
    @dheerparekh1305 7 місяців тому

    the powershell says that 'pip' is not recognized , what to do

    • @LiamAllerton
      @LiamAllerton 7 місяців тому

      make sure pip is installed

  • @Norcuck
    @Norcuck 6 місяців тому

    how to make colored text with ctk label, like first half red second half blue?

    • @janlochman1985
      @janlochman1985 4 місяці тому

      Have you tried slicing or placing two widgets next to each other?

  • @LuaExplained
    @LuaExplained 9 місяців тому

    what exactly are you coding this in?

    • @JaimeCastillo-o4f
      @JaimeCastillo-o4f 9 місяців тому +1

      The language is Python. The IDE looks like Visual Studio Code

    • @janlochman1985
      @janlochman1985 4 місяці тому

      @@JaimeCastillo-o4f Well he uses sublime.

  • @tha3dudes
    @tha3dudes Рік тому

    How come code can run well the first 10 times you execute them and than all of the sudden it gives you a
    SyntaxError: invalid syntax?
    The code in question is:
    switch=ctk.CTkSwitch(window,
    text="Excercise switch",
    fg_color="red",
    progress_color="white",
    button_color="light blue"
    command=lambda:ctk.set_appearance_mode=("dark"))
    switch.pack()
    error is command=lambda:ctk.set_appearance_mode=("dark"))
    When I remove this it will say the error is
    switch.pack()
    anyone able to help me out it worked fine when I first wrote and tested it.....

    • @tha3dudes
      @tha3dudes Рік тому

      Apparently moving the code up the chain of code it suddenly works again?!? Wtf...

    • @avimir8805
      @avimir8805 Рік тому +3

      Something is wrong with identation levels (how many "tabs" are in the lines with arguments). Here you forget about comma between two last arguments

    • @tha3dudes
      @tha3dudes 11 місяців тому

      @@avimir8805 I see thank you for the solution :D

  • @homieluca
    @homieluca Рік тому

    When I run my program the window has a white background, can somebody help me?

    • @MiniSkyAdventures
      @MiniSkyAdventures Рік тому

      After importing the customtkinter module, type:
      customtkinter.set_appearance_mode("dark")

  • @burgercraft3546
    @burgercraft3546 Рік тому +1

    thank you for you help

  • @TejeshP-uo4qw
    @TejeshP-uo4qw Рік тому

    Hey for me this does not work it says module 'customtkinter' has no attribute 'CTk', plz help

    • @janlochman1985
      @janlochman1985 4 місяці тому

      We would need to see your code then.

  • @ssigitas69
    @ssigitas69 Рік тому

    Nice. I don't know what ttk do. Because I am learning Tkinter and didn't face with ttk yet. But what I can not understand here, why insted from tkinter import * you use import tkinter as tk? Same and with customkinter....
    when I use , from tkinter import * , I don't need to say label = tk.TkLabel(), I say just label=Label(window, text="Hello")...........
    Or customtkinter works different?

    • @AbunaiRei
      @AbunaiRei Рік тому +1

      I think it's because when you import everything that's a lot of information and it can slower you programm but if you import as tk you decide what widget or function to use, just what you need. I am french so i hope i'm understood

    • @xzex2609
      @xzex2609 Рік тому +2

      if you import all the libraries in a module you import 99% of things that you don't use at all and that will take a lot of memory for nothing , this way is just for learning and simplicity(see below), if you don't import customtkinter as ctk , every time that you want to use you its classes and functions you got to write the full name of the module like btn = customtkinter.CTkButton( .....) with import as you simply write ctk.CTkButton(....)
      when you import * then you can use like this
      button1 = Button(....)
      but you will import lots of widgets that you don't use and make your program slow and lots of other problems , instead you use this
      from tkinter import Button , Label , Entry
      If you just need these three elements you just import them and you don't have to call them like
      import tkinter
      button = tkinter.Button(....)
      entry = customtkinter.CTkButton(....)
      most of module names are long and having mixed uppercase lowercases, ie :
      import PySimpleGUI as sg
      now you can use sg to call its classes otherwise you got to write exactly
      PySimpleGUI.Text(-------) with P , S , GUI ( all uppercase )
      you simply write
      sg.text
      other way ( mosty just used in educational purposes ) you use
      from PySimpleGUI import *
      and you are free to use
      text(......)
      but suppose you have a variable named text in your program , then you got FUCKED

  • @giomacale8045
    @giomacale8045 Рік тому

    hello is there a way we can set ctk as fullscreen?

    • @SabinPoudel
      @SabinPoudel Рік тому

      Check out
      Expense tracker Customtkinter project (modern GUI)
      ua-cam.com/video/1p_Y_QB3c1A/v-deo.htmlsi=V0XgF8VZvO5CUxsD

  • @kvjrey
    @kvjrey Рік тому +1

    its good, but I noticed it feels not complete

    • @SabinPoudel
      @SabinPoudel Рік тому

      Check out
      Expense tracker Customtkinter project (modern GUI)
      ua-cam.com/video/1p_Y_QB3c1A/v-deo.htmlsi=V0XgF8VZvO5CUxsD

  • @santozsql4765
    @santozsql4765 Рік тому +1

    Que incrivel!

    • @SabinPoudel
      @SabinPoudel Рік тому

      Check out
      Expense tracker Customtkinter project (modern GUI)
      ua-cam.com/video/1p_Y_QB3c1A/v-deo.htmlsi=V0XgF8VZvO5CUxsD

  • @RIXZZYTHEGAMER
    @RIXZZYTHEGAMER Рік тому

    Clear code second channel be like

    • @MutanGFX
      @MutanGFX Рік тому

      I'm wondering if it's a second Chanel or someone just cloned the voice

    • @RIXZZYTHEGAMER
      @RIXZZYTHEGAMER Рік тому +1

      @@MutanGFX Dude, he does really sound alike

    • @phairojthamrongthanyawong3531
      @phairojthamrongthanyawong3531 Рік тому

      @@RIXZZYTHEGAMER Totally agree. Same video style too.

  • @kench1
    @kench1 4 місяці тому

    TypeError: CTkSwitch.__init__() missing 1 required positional argument: 'master' what does the mast argument do?
    switch = ctk.CTkSwitch(window, text="CTkSwitch", command=switch_event,
    variable=switch_var, onvalue="on", offvalue="off") but still says there is not master
    nvm i got it i was being a silly boy