Make Tkinter Look 10x Better in 5 Minutes (CustomTkinter)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
this is how normal teaching the applications look like and in this video I'll show you how to turn them into this with the custom take into package and a few minor tweaks to your code install it by running Paper Stock custom decanter imported and let's get started on the common languages you expect with some extra styling to start the window can be created using the ctk class this has all the same functions as the 1mt Kinder so you can resize it and run the main Loop to launch the window using the same functions now that we have a window what can we put in that the most common widget is a button custom ticking that provides this under the ctk button class here we can use the same layout functions with undertaking the widgets which are packed place and grid there's some styling by default but I can change things inside the corner radius which determines how long the corners are and the colors for the phone around half a stick right now my average and down mode based on my system settings but if you want to toggle between dark and light mode you can set the appearance mode manually and the widgets will update the match look with the button the Border we can set the Border color and bottle with we can also send the foreground to transparent to make it an outline button if you want to give the button an icon save it as an image and open it using Pillow by importing the image class below is a package used to process images and if you don't have it installed you need to run this command we can then set it as an image using the ctk image class where we can specify different versions for the light and dark mode for displaying text there's also the label widget which was just like the one indicator here you can specify any font that you have installed alongside the font size in a tuple the text color can also be changed using the text color property another common user interaction is to provide the drop-down selection for that there is the combo box Studio where you can pass in the values displayed in the drop down menu here you can change the foreground border and drop down colors speaking of options we also have the checkbox switching to provide a selection of different options the colors size and routiness can all be configured here as well similar to using checkboxes you can also create a switch widget if you want to have talkable options for userable which are numbers that's the slider widget which lines the user drag to select the value you can change the stand and end values as well as the number of steps the button color progress color and orientation are also customizable but what about tax input for that we have the entry widget and you can specify things like the placeholder tanks Signs and text color but what if you need a larger attack simple field that's the textbook solution which provides a scrollable texture spending multiple lines the scroll bar Corner radius and Border all customizable here if you want a reference for the properties for each widget you can find all the information in the documentation which are linked below not aware of widgets in a window how do we handle events like button clicks just like in decanter we can use the command parameter on the widget and specify a function which is then called when the input widget is clicked on and as for wedges like the combo box and the slider the function also receives the value that the user has selected next up to retrieve text input we need to use the get method on the widget the value will be whatever the user is currently input when the method is called and if you're trying to get a value from a text box you need to specify the stat and end index of the tags that you want to retrieve here I've selected everything which is usually what you want to do besides that to change properties on widgets within functions we can also use the configure method this allows us to specify any property as a parameter and give it as new value moving on to create different sections in your interface we can make use of frames to separate our widgets the frame widget acts like a container and can be customized with its color and water to use it we just need to specify it as a master for the widgets that should be placed inside of it if you have more wages and want to make the frame scrollable use a scrollable frame which can be used for both vertical and horizontal scrolling and which has a customizable score by as well besides using frames you can also store your widgets and different tabs similar to hybrid caps in a browser for that we will need to create an instance of ctk type view and attach to it using the add method where this is the name for the tab when you want to add regions to a specific time you then need to specify the master as the same cabinet like so reason that the widgets cannot be customized with specific colors but only if you wanted to quickly change their colors all at once the scent default color theme function provides this functionality you can choose from blue green or dark blue to quickly change the colors of all widgets there are also custom colored themes made by others which you can find in the link below simply choose one download it and send the quality messages on file which contains all the color codes now that we've seen the widgets installing custom designer provides here are some examples of applications that I've quickly made using the widgets from Custom ticket that we went over in this video some of them use a few extra packages such as tables made by other developers that you can install separately or leave the links to one of the code for them below as well there's custom ticket in 5 minutes watch this video links if you're interested in Python guis besides that consider liking this video and subscribing if it has helped
Info
Channel: TurbineThree
Views: 154,086
Rating: undefined out of 5
Keywords:
Id: Miydkti_QVE
Channel Id: undefined
Length: 4min 39sec (279 seconds)
Published: Tue Sep 19 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.