Segmented Buttons - Tkinter CustomTkinter 9

  Рет қаралды 6,671

Tkinter․com

Tkinter․com

Күн бұрын

In this video we'll look at Segmented Buttons in CustomTkinter and Python.
Segmented buttons are a group of three switchable buttons.
I'll show you how to use them, and also how to make them look however you like!
#tkinter #codemy #JohnElder
Timecodes
0:00​​ - Introduction
1:14 - Create Segmented Button
2:22 - Create Clicker Function
3:08 - Default Selection
4:07 - Create Label
4:38 - Update Clicker Function With Value
5:25 - Remove Default Selection
5:41 - Use .get() Instead of Value
8:05 - Height and Width
8:33 - Button Text Font
8:49 - Corner Radius
9:24 - Border Width
9:46 - Background Color FG
10:16 - Selected Color
10:40 - Selected Hover Color
11:11 - Unselected Color
11:33 - Unselected Hover Color
12:07 - Text Color
12:31 - Button State
12:53 - Disabled Text Color
13:38 - Dynamic Resizing
14:57 - Conclusion

Пікірлер: 17
@TkinterPython
@TkinterPython 9 ай бұрын
▶ Watch CustomTkinter Playlist ✅ FREE Tkinter Widget Book bit.ly/45iO4OP bit.ly/3K4qlZC ▶ See More At: ✅ Subscribe To My KZbin 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
@tobiaswegener1234
@tobiaswegener1234 9 ай бұрын
Like your videos. Very straight to the point.
@TkinterPython
@TkinterPython 9 ай бұрын
Thanks!
@jinchaohan2485
@jinchaohan2485 5 ай бұрын
something might be more interested: how to play button in different way( horizontal or vertical) and how to put it in layer/frame/tabel with flex contrl of the position
@gregoribucher5852
@gregoribucher5852 6 ай бұрын
Hi there. Great explanation. I’m just getting into Python as I have only worked with C before. However for me the scaling (width and height) are not working for the segmented button. The size just stays adapted to the text. As a side note I‘m placing the button on a frame with some other widgets using the .place() method. I would appreciate some suggestions on how to solve this issue. Thanks in advance.
@meunotebook1777
@meunotebook1777 4 ай бұрын
Hey, I managed to fix this problem. I think theres kind of a bug in the width and heigh attributes for segmented buttons. What I did was simply use relwidth and relheight using the .place method. Apparently it doesn't work if you put the segmented button inside a scrollable frame but I still have to do some tests. Edit: I made another test using pack and when I use fill = "both", the button just gets bigger and fill all the frame. Of course it will not look good if you put the button on your root screen, but inside a frame and a scrollable frame it looks great
@vgeraph5730
@vgeraph5730 5 ай бұрын
hey , ive a problem into canvas with ctkbuttons. when i put ctk buttons in a canva and canva has bg image, it has background color and it doesnt remove, even with transparency , can someone helps me?
@DRKLRD-kv4cm
@DRKLRD-kv4cm 3 ай бұрын
i'm getting the same issues but with Frames. I don't want to discourage you, but from what i've learned so far, the TRANSPARENT option is kind of a ruse. It's not transparent at all, it just sets the background color to become the same color of the button master (background color, that is), so even if you put an image there, it will still take the default canva bg color :( This was one of my major gripes with tkinter and i had hoped it would be solved with CTk, but it looks like that's not the case
@ajinkyax
@ajinkyax 9 ай бұрын
Hi I’m new to Python. What is the use of GUI apps ? My question is we are the world of web apps and PWAs; do people use python for gui app and What’s the use case?
@TkinterPython
@TkinterPython 9 ай бұрын
yes people still use computers with apps on them.
@user-ij4ch4fc2n
@user-ij4ch4fc2n 9 ай бұрын
Brazil's first like and comment
@TkinterPython
@TkinterPython 9 ай бұрын
Awesome
@AvneetAhuja
@AvneetAhuja 8 ай бұрын
can i have their layout to be vertical somehow?
@ItsFaveripper
@ItsFaveripper 5 ай бұрын
same my dude, let me know if you found a way
@meunotebook1777
@meunotebook1777 4 ай бұрын
I think you can try to create another segmented button with other value (I'm starting to learn python so idk if theres a way to create a list of values and tell the segmented button to take only one) you can use the pady to make it go a little bit under the other button. I really don't know if thats efficent but I think it works
@eimdev
@eimdev 9 ай бұрын
waiting for flet tutorials 🙂
@TkinterPython
@TkinterPython 9 ай бұрын
This is a channel with nothing but Tkinter tutorials. There will never be flet here.
Sliders - Tkinter CustomTkinter 10
11:07
Tkinter․com
Рет қаралды 7 М.
Using tkinter with classes
28:23
Atlas
Рет қаралды 57 М.
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 34 МЛН
Create Stunning Python GUIs in 10 Minutes With Drag & Drop
11:38
Coding Is Fun
Рет қаралды 36 М.
5 Useful F-String Tricks In Python
10:02
Indently
Рет қаралды 286 М.
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 391 М.
Pack Vs Grid For Placement - Intro To Tkinter 3
13:20
Tkinter․com
Рет қаралды 2 М.
Python GUI tkinter #13 - Combobox. Выпадающий список
11:07
Источник Знаний
Рет қаралды 9 М.
Understanding parenting and frames in tkinter
11:42
Atlas
Рет қаралды 12 М.
An overview of tkinter layouts
18:02
Atlas
Рет қаралды 13 М.
Intro To Object Oriented Tkinter - Object Oriented Tkinter 1
16:42
Tkinter․com
Рет қаралды 17 М.