![]() ![]() CTkEntry ( master = root_tk, width = 120, height = 25, corner_radius = 10 ) entry. Label text font, tuple: (font_name, size)Įxample Code: entry = customtkinter. Label text color, tuple: (light_color, dark_color) or single color place ( relx = 0.5, rely = 0.5, anchor = tkinter. ![]() CTkLabel ( master = root_tk, text = "CTkLabel", width = 120, height = 25, corner_radius = 8 ) label. configure_color ( bg_color = new_bg_color, fg_color = new_fg_color, hover_color = new_hover_color, text_color = new_text_color ) CTkLabelĮxample Code: label = customtkinter. Put an image on the button, removes the text, must be class PhotoImageĬTkButton Methods: CTkButton. Text color, tuple: (light_color, dark_color) or single colorīutton text font, tuple: (font_name, size) Hover color, tuple: (light_color, dark_color) or single color ![]() CENTER ) Show all arguments: argumentįorground color, tuple: (light_color, dark_color) or single colorīackground color, tuple: (light_color, dark_color) or single colorīorder color, tuple: (light_color, dark_color) or single color CTkButton ( master = root_tk, text = "CTkButton", command = button_event, width = 120, height = 32, border_width = 0, corner_radius = 8 ) button. You can find an example program ( /simple_test_images.py ), where IĬreated two buttons with a bell and a settings image on them:ĭocumentation - CustomTkinter Elements CTkButtonĮxamle Code: def button_event (): print ( "button pressed" ) button = customtkinter. Pass a PhotoImage object to the CTkButton with the argument image. It's also possible to put an image on a CTkButton. Here I changed the mainĬolors and removed the round corners, and added a border to the buttons: With macOS darkmode turned on, it looks like this:īut can also customize it by yourself. There are at the moment.Maybe this is a good reference if you want toĬreate your own application with this library. Kind of a menu on the left side, and I used all CustomTkinter elements Here I used the customtkinter.enable_macos_darkmode() command toĮnable the macOS darkmode, and used multpiple CTkFrames. If you set the appearance mode to "System", it should change with Which gives the following with the above simple button program: import tkinter import customtkinter customtkinter. So if you want a dark window titlebar, you have to install anaconda python version Currently only the anaconda python versions have Tcl/Tk >= 8.6.9. import tkinter import customtkinter # = 8.6.9, then you can enable the macOSĭarkmode. Next to your program, and then you can do import customtkinter. To use CustomTkinter, just place the /customtkinter folder from this repository Which can either be set manually or get controlled by The CTkButton, which can be used like a normal tkinter.Button,īut can be customized with a border and round edges.ĬustomTkinter also supports a light and dark theme, Tkinter extension which provides extra ui-elements like condarc file on ubuntu 16.With CustomTkinter you can create modern looking user condarc file that contains the proxy address. I see online that I should add a proxy into a. Maybe a new proxy setting is necessary on anaconda,however,the ubuntu 16.04 has setted proxy. ProxyError(MaxRetryError("HTTPSConnectionPool(host='', port=443): Max retries exceeded with url: /pkgs/main/linux-64/2 (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError(': Failed to establish a new connection: Temporary >failure in name resolution',)))",),) HTTP errors are often intermittent, and a simple retry will get you on your way. When I use conda update -all, there is a error shown as followingĬondaHTTPError: HTTP 000 CONNECTION FAILED for url Īn HTTP error occurred when trying to retrieve this URL. ![]() I am configuring the anaconda on ubuntu 16.04. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |