Modern GUI Design with TTKBootstrap - Tkinter TTKBootstrap 1
In this video I'll start to show you the TTKBootstrap library for Tkinter.
TTKBootstrap allows you to create much more modern looking GUI's for Tkinter.
It's modeled after the hugely popular Bootstrap CSS framework for building websites.
Choose from dark themes, or light themes and go from there!
#tkinter #codemy #JohnElder
Timecodes
0:00 - Introduction
1:25 - Dark Themes
2:00 - Light Themes
2:30 - Check Out The Docs
2:42 - Pip Install TTKBootstrap
3:33 - Basic Usage
5:08 - Style Guide
7:29 - API Docs
8:24 - Conclusion
Пікірлер: 117
▶ Watch TTKBootstrap Playlist ✅ FREE Tkinter Widget Book bit.ly/3hphbwA 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
Great video. I’m the author of this library and I’m very much looking forward to seeing all this through someone else’s eyes as well as mining all the helpful feedback in the comment section. 😊
@TkinterPython
Жыл бұрын
Awesome, I'm really enjoying the library so far...and I think everyone else here on the channel is too!
@Smart_Coder7
4 ай бұрын
Hi, Can you pls tell me How to convert the GUI made of ttkbootstrap using Pyinstaller because I am facing some Problems.
Please more tutorials with this tkinter framework 😁👍🏽
@TkinterPython
Жыл бұрын
Will do!
Too great impatient to see more videos from you to master this one! congrats !
@TkinterPython
Жыл бұрын
Thanks!
Ooohhh, this makes me excited. I can't wait for the new videos. Toodles!
@TkinterPython
Жыл бұрын
me too
Oh wow, looks awesome. I remember when CustomTkinter was the "big deal" but this library kills it all
@TkinterPython
Жыл бұрын
Yep
Thank you, your tutorials are always amazing!
@TkinterPython
Жыл бұрын
Very welcome, thanks for watching!
Thank you for the info! I'm definitely going to use it
@TkinterPython
Жыл бұрын
Happy to hear it!
Wow, this is stunning!
@TkinterPython
Жыл бұрын
Right?!
YES! FINALLY! Thank you john
@TkinterPython
Жыл бұрын
Welcome!
Thanks man, your tutorial helped me getting started with tkinter.
@TkinterPython
Жыл бұрын
Awesome!
video 1 - already love this!
@TkinterPython
7 ай бұрын
Happy to hear it!
Sounds like a great new playlist!
@TkinterPython
Жыл бұрын
should be fun!
Thank you! That was interesting as I would never have thought we can migrate bootstrap to desktop via tkinter!!!!
@TkinterPython
Жыл бұрын
Pretty exciting!
This was very useful, Thank you!
@TkinterPython
9 ай бұрын
Welcome!
Terrific and useful tute!
@TkinterPython
6 ай бұрын
Thanks!
Amazing video thank you !
@TkinterPython
Жыл бұрын
Welcome!
Thank you for the info
@TkinterPython
Жыл бұрын
Welcome!
I'm playing around with tkinter and Spotify API to generate playlists based on genres and release date filters, this came at a perfect time as CustomTKinter lacks too much!
@TkinterPython
Жыл бұрын
Awesome
You should have millions of suscribers!
@TkinterPython
Жыл бұрын
I agree! Tell your friends!
Thankful 🙏
@TkinterPython
Жыл бұрын
Thanks!
Good video
@TkinterPython
Жыл бұрын
Thanks!
i am not a fan of these css frameworks however as I am just starting to develop websites using python, I like the idea of using a css framework to help in the learning process, I started building websites before frameworks became popular and despite some experimentation with them, I still find hard coding my css to be a more stable way of design. I look forward to your future videos on this.
@TkinterPython
Жыл бұрын
:-)
I think that one of the best things that the KZread algorithms suggested to me is your tkinter course, and here it is doing it again. Thank you very much John. I have a question please, when I'm trying to reduce the size of the Tk main window after executing the code, some of the widgets like disappear, knowing that I did make their sizes relative to the screen size (a percentage), how can I solve this problem. Excuse my mid level English if there is any mistake, and thank you in advance.
@TkinterPython
Жыл бұрын
You're very welcome. When you resize the window you may have to explicitly resize the widgets using .config()
Amazing tutorial, thanks a lot. I have a question, i would like to use the localization in French. (C:\Python310\Lib\site-packages\ttkbootstrap\localization\msgs.py) How can i do that in my main.py? Thank you again.
Thanks. Help me please. How to delete padding or margin (padx) into cell in ttkbootstrap.tableview.Tableview?
Awesome video I'm really excited to use this! One problem I'm having is when I run any program using ttkbootstrap the first time I run the program the styles on the widgets load in fine. Next time I run the program the styles don't load in and it looks like a normal tkinter widget again. Any idea why this might be happening? (I'm using the anaconda installation of spyder to write my python code so I'm wondering if it's an issue with spyder). Edit: The window theme (superhero in my case) also extends to all my other GUI programs even when they don't use ttkbootstrap so I wonder if something isn't closing right
@TkinterPython
Жыл бұрын
There's no way that should even be possible. It could be an anaconda/spyder thing.
Hi, Lovely videos, truly inspiring. I have one request , can you please make a video on centralized log monitoring of application not system in tkinter 👍
@TkinterPython
Жыл бұрын
logging isn't really my thing, I'm not a systems admin...
This looks like.a good way to refresh an application to a newer look. That has been my biggest complaint with Tkinter.
@TkinterPython
Жыл бұрын
Definitely
I think the reason they suggest importing ttkbootstrap as ttk is that it makes it easy to port a project from ttk. In a project I just changed the import and it converted mostly flawlessly.
@TkinterPython
Жыл бұрын
Interesting
@steveholder7289
Жыл бұрын
@@TkinterPython Pretty sure the only parts that didn't was some custom style stuff.
Please More Tutorials on This Tkinter Framework😊🙂
@TkinterPython
Жыл бұрын
Will do!
Have you done much with the TableView? I'm trying to understand how to either get the selected row from binding a single / double click to the TableView, or editing the short-cut (right click) menu to add an additional / custom action to the menu? Any ideas / recommendations on that? Much Thanks, David
@TkinterPython
Жыл бұрын
Yeah, I have a three hour deep dive video on it (well treeview, which is the same thing): kzread.info/dash/bejne/qphksJeYpZzTptY.html
@davidpimental6704
Жыл бұрын
@@TkinterPython I will watch it. But I'm looking for an answer to how to get the selected row of the TableView and how to set it to a binding or change the right click menu to add a custom action. Can you explain how to do this? Or do you explain it in your video?
@TkinterPython
Жыл бұрын
@@davidpimental6704 lol You asked a question and I pointed you to the video. Figure it out man.
@davidpimental6704
Жыл бұрын
@@TkinterPython I looked at your code and I understand how you handle row selection in the TreeView widget and it all seems straightforward. Thanks for the video. However, the ttkbootstrap TableView widget is obviously not the same as the TreeView widget - it doesn't share the same properties as TreeView - for example, the selection property on the rows. There is no selection property on the TableView widget. But, if I can't figure that out, I'll use the TreeView widget, as you demonstrated, it acts the same way as the TableView widget.
That's what I was missing in tkinter. Though I know it's very powerful. I think it can create same ui and give same ux as pyqt can
@TkinterPython
Жыл бұрын
Yep
Hey. First of all thanks for showing a good distro of tkinter. Do you know if this works on python 3.11? Because most of then not work on recent python version.
@TkinterPython
Жыл бұрын
As far as I know, it does.
gotta love open source! Let's just ignore the old ttk widgets that everyone created their production code with, and create everything over again.
@TkinterPython
Жыл бұрын
Yep
i am using ttkbootstrap when my one page is destroyed and agian comback to that window the the bootstarp not working how to fix it
@TkinterPython
Жыл бұрын
Sorry, don't know what you mean by "page" or by "destroyed".
Its great they considered Treeview as far as I know Custom Tkinter has no Treeview... I wonder when they'll consider modifiying the tilebar. Neither Tkinter nor Custom Tkinter and I am not sure about TTKBootstrap non has given the functionality to modify the Titlebar. You can just add logo or disable button (maximize, minimize etc) or go to full screen mode with no Title Bar. No where I found where you can actual style the Title bar
@TkinterPython
Жыл бұрын
You have to disable it and then build your own titlebar. I have a video on that on the codemy channel.
@usmankhawar888
Жыл бұрын
@@TkinterPython Yes sir I know that. Just hoping that if they implement that would save a lot of hastle
when i run my code it says no module named ttkbootstrap even though i downloaded it and confirmed. Maybe it's not in the right destination?
@TkinterPython
Жыл бұрын
What do you mean by downloaded? To install it you use pip install.
Thank you~~ As Always~~
@TkinterPython
Жыл бұрын
Very welcome!
Is this also super difficult/impossible to compile with pyinstaller using --onefile?
@TkinterPython
3 ай бұрын
try it and see :-p
All seems good .. but i am unable to fetch date from bootstrap DateEntry widget? Can you explain how to do that.. I read the module i can not see that it support fetching date from dateentry widget... I hope you see it and provide an explanation.
@TkinterPython
Жыл бұрын
I've answered you about this several times...
I tried converting a simple tkinter program to use ttkbootstrap. Just switching the import mostly worked. The problem is that it quietly ignores my setting the background color and the border for my Canvas objects. If the options have changed, why don't I get an error? If they are correct, why don't they work? I am using borderwidth=2, bg='white', highlightbackground='black', highlightthickness=2 . I have tried to search for documentation, but found nothing related to what arguments Canvas expects. Thanks in advance for any help you can provide.
@TkinterPython
Жыл бұрын
You can't expect to just load ttkbootstrap and everything works from your old code without making any changes. That's not how it's supposed to work. I will try to get into canvas stuff with this library at some point, but I don't have any videos on it at the moment.
@johnbennett1465
Жыл бұрын
@@TkinterPython I was expecting to get errors that I would have to fix. I was not expecting that parameters would be accepted but ignored. I was also not expecting a complete lack of documentation on what changes are needed. If such documentation exists, it is well hidden.
@TkinterPython
Жыл бұрын
@@johnbennett1465 just use the regular tkinter canvas, or check the docs here: ttkbootstrap.readthedocs.io/en/latest/styleguide/legacywidgets/
@johnbennett1465
Жыл бұрын
@@TkinterPython thanks. I was using the TK version, but I missed seeing the autostyle=False part.
@johnbennett1465
Жыл бұрын
@@TkinterPython Just FYI, I only had to do the following changes to make my program work. Change from tkinter import ttk to import ttkbootstrap as ttk Change root = tk.Tk() to root = ttk.Window() Add autostyle=False in two places. So initial conversion is easy IF you know a few gotchas. I expect a larger program would run into a few more issues, but it is nice to quickly get it running. Figuring out the needed changes to the look is much easier once the code runs correctly.
is there a solid drag and drop designer, like in qt5 ?
@TkinterPython
Жыл бұрын
no
It seems you gave a lot of emphasis on the color themes. Is it worth it beyond that? I could not figure it out from your video.
@TkinterPython
Жыл бұрын
Sorry, I don't know what you're talking about.
Does this work in TCL or specific to Python?
@TkinterPython
Жыл бұрын
this is a python library for tkinter.
where do i type the pip install ttkbookstrap?please reply thank u
@TkinterPython
5 ай бұрын
Into your terminal
@dustinalcantara5072
5 ай бұрын
thank you @@TkinterPython
But can it be used with Tcl/Tk?
@Codemycom
Жыл бұрын
What do you mean? This is specifically for Tkinter
Why does nobody think about the need to get the meter current count? You can set the meter below 0 and can't create a rule that won't allow you to do so.
@TkinterPython
10 ай бұрын
Are you maybe confused about where you're posting this comment? Of course you can create a rule to do anything you want with the meter. And you can get the 'amountused' anytime you want.
Does learning a TTkBootstrap replace learning tkinter?
@TkinterPython
5 ай бұрын
No
@user-fc3pg5xn5l
5 ай бұрын
Thank you very much for explaining@@TkinterPython
@TkinterPython
5 ай бұрын
sure thing@@user-fc3pg5xn5l
Widget canvas or windows....wich may be AT thé toplevel. Searching controls for scada and industrial system, animated pump, l'AMP etc... this may not bé helphful, the canvas IS more low level and more extensible also this widget may bé cool for chose color..
Will tkinter compile for mobile?
@TkinterPython
Жыл бұрын
No
@Arn-kg5tf
Жыл бұрын
Yes its work for me using pydroid, trouble begins with file system that smells Google control over your data...especially sqlite3 but its work great!! In fact python does what java had promise . I made voice recognize to control plc on Android studio that IS thé worst programming i v e made ...java no more !! Google voice recognize no more. Microsoft sapi 5 had been simple for use but Microsoft need to change thing that works...
Flet is also Good?
@TkinterPython
Жыл бұрын
Flet is for flutter, it has nothing to do with tkinter.
@contraplano3157
Жыл бұрын
@@TkinterPython Flet is a framework that allows building interactive multi-user web, desktop and mobile applications in your favorite language without prior experience in frontend development. You build a UI for your program with Flet controls which are based on Flutter by Google. Flet does not just "wrap" Flutter widgets, but adds its own "opinion" by combining smaller widgets, hiding complexities, implementing UI best-practices, applying reasonable defaults - all to ensure your apps look cool and professional without extra efforts.
@contraplano3157
Жыл бұрын
It is just one more Gui. I just asked your opinion about it.
@TkinterPython
Жыл бұрын
@@contraplano3157 I know what flet is.