Balloon Text Tool Tips With Tkinter - Python Tkinter GUI Tutorial

  Рет қаралды 16,664

Codemy.com

Codemy.com

3 жыл бұрын

In this video I'll show you how to do Balloon Text Tool Tips with Tkinter and Python.
To create our tool tips, we'll use tix widgets. Tix widgets were deprecated back in Python 3.6 or so, and you shouldn't use them...unless you really really want to ;-) They aren't the best-documented widgets out there, and they are no longer maintained; so use at your own risk!

Пікірлер: 92
@Codemycom
@Codemycom 3 жыл бұрын
▶️ Watch Entire Tkinter Playlist ✅ Subscribe To My KZbin Channel: bit.ly/2UFLKgj bit.ly/2IGzvOR ▶️ See More At: ✅ Join My Facebook Group: Codemy.com bit.ly/2GFmOBz ▶️ Learn to Code at Codemy.com ✅ Buy a Codemy T-Shirt! Take $30 off with coupon code: youtube1 bit.ly/2VC9WUN ▶️ Get The Code bit.ly/3fLFQ8p
@toxxmoloi1873
@toxxmoloi1873 3 жыл бұрын
You always know what we need when we need it
@Codemycom
@Codemycom 3 жыл бұрын
@@toxxmoloi1873 :-)
@toxxmoloi1873
@toxxmoloi1873 3 жыл бұрын
Can you make a video showing us how to install the tix module because it keeps saying that it can't find the module
@Codemycom
@Codemycom 3 жыл бұрын
@@toxxmoloi1873 There's nothing to install. It comes with python, you just have to import it like I did in the video
@parsabahrambeik4381
@parsabahrambeik4381 3 жыл бұрын
Thank you very much. Was very precise work.
@Codemycom
@Codemycom 3 жыл бұрын
Glad it helped
@SammarpanDasguptaOfficial
@SammarpanDasguptaOfficial 3 жыл бұрын
Awesome video sir.....love your teaching..............
@Codemycom
@Codemycom 3 жыл бұрын
Thanks
@EFoxVN
@EFoxVN Жыл бұрын
Thanks for the video. A thought: A guy named Burkhard Meier took a completely different route (in a book of his) with regards to Tooltips in Tkinter. He basically creates a small little new Toplevel window with the toolbar removed which he binds with the widget. He uses a class of course and passes the widget and the tooltip text. With the toplevel window, you can set the colours to your liking as well. Maybe you can make a lesson on that method one day... 😉 All this just goes to show that if a programmer wants to do something he will find a way...
@RyanDanielG
@RyanDanielG 2 жыл бұрын
Smash that like button guys n gals! its free! great python tkinter tutorial, Codemy. Thanks
@hackercop
@hackercop 3 жыл бұрын
Just use the Pmw libary for balloon widgets instead its much newer and looks better. Here's some demo code from tkinter import * import Pmw root = Tk() Pmw.initialise(root) # Create some random widget button = Button(root, text = " This is a Test", pady = 30) button.pack(pady = 10) # create ballon object and bind it to the widget balloon = Pmw.Balloon(root) balloon.bind(button,"Text for the tool tip") mainloop()
@ricardosanchezglod9443
@ricardosanchezglod9443 3 жыл бұрын
can i hide this?
@sailendrachettri8521
@sailendrachettri8521 3 жыл бұрын
Thanks for sharing man!
@hackercop
@hackercop 3 жыл бұрын
@@sailendrachettri8521 You're welcome!
@Doshinkyo
@Doshinkyo 2 жыл бұрын
Yep, this is the best sollution I've found. Anyone know if there's a way to change the bg color of a Pmw Balloon?
@jeffsharp7329
@jeffsharp7329 3 жыл бұрын
Thanks for the videos! Can you bind tix to treeview headers?
@kendalk08
@kendalk08 3 жыл бұрын
Im not sure if youll see this. I made a label with place(x=mouse_x, y=mouse_y) and it works, but when i place_forget my buttons disappear if the "tooltip" was on top of the buttons. And i dont understand why. Maybe you could shed some light on it?
@jmachado9875
@jmachado9875 3 жыл бұрын
Hi! To turn the baloon's background color to white, one can use: for sub in tip.subwidgets_all(): sub.configure(bg='white')
@Codemycom
@Codemycom 3 жыл бұрын
good tip
@sinakarimi8273
@sinakarimi8273 3 жыл бұрын
It's good and it config 5 widget in the loop, the first one affect the root, so if you choose color like green, the background of the app change to green too, for this problem you should skip index 0 of the loop to skip the affection of the root! for index,sub in enumerate (tip.subwidgets_all()) : if index > 0: sub.configure(bg='red')
@sinakarimi8273
@sinakarimi8273 3 жыл бұрын
Index 0 = . Index 1 = balloon.f1 Index 2 = balloon.f1.label Index 3 = balloon.f2 Index 4 = ballooon.f2.message
@jmachado9875
@jmachado9875 3 жыл бұрын
@@sinakarimi8273 Great, thanks for sharing!
@sinakarimi8273
@sinakarimi8273 3 жыл бұрын
@@jmachado9875 you're welcome sir
@ramehharmouch6245
@ramehharmouch6245 3 жыл бұрын
in the video number 124, you put the excel columns manually, how to get the number of columns and rows active in an excel file automatic? Example: how to do a for loops to get the numbers of rows and columns from the excel file ? What is the python function name to get the rows and columns from the excel file ?
@charanreddy5227
@charanreddy5227 3 жыл бұрын
Thanks sir
@Codemycom
@Codemycom 3 жыл бұрын
Welcome!
@tonnykizito816
@tonnykizito816 3 жыл бұрын
Balloon tips work fine but when I convert it to excitable file using pyinstaller, it show a massage " can't find package Tix" really I'm stuck.
@pititav.c.6618
@pititav.c.6618 3 жыл бұрын
Keep explaining like that!!!! Fantastic. But, tix after 2002, does no give any update. And actually it is not working for tcl and tk after v.8.4. I am in python 3.8, so the only way is installing also previous versions of tcl and tk.
@gouravsharma319
@gouravsharma319 3 жыл бұрын
Hello chief...i am working on a school project...i seen your videos of CRM and made a project on that....I wanna know...how can we do that if another person filled all entries...and it will be saved in same database...let as assume the person is far far miles away...and i gave him my exe file of project and he tries that project from his home.... Help me to get out of this problem....?
@Codemycom
@Codemycom 3 жыл бұрын
instead of using a local database you would use one hosted online
@marcus.the.younger
@marcus.the.younger 3 жыл бұрын
@@Codemycom maybe mysql?
@Codemycom
@Codemycom 3 жыл бұрын
@@marcus.the.younger sure
@shehab976
@shehab976 3 жыл бұрын
sir, i am getting this... _tkinter.TclError: invalid command name "tixBalloon" code - from tkinter.tix import* tip_line=Balloon(root)
@Codemycom
@Codemycom 3 жыл бұрын
Rewatch the video, you forgot to import tix
@saritachaurasia5326
@saritachaurasia5326 3 жыл бұрын
Want a video on - How can we make our Tkinter app a executable file using cx-freeze and the proper way to distribute our apps to others. Plz plz plz sir !!
@Codemycom
@Codemycom 3 жыл бұрын
noted
@cmputerprgrammer7800
@cmputerprgrammer7800 3 жыл бұрын
Sir, how to make label widgets selectable, so that the user can copy the selected text if needed.
@cmputerprgrammer7800
@cmputerprgrammer7800 3 жыл бұрын
@@cool-cloud But, the user can edit the text box...i dont need that....i want the user to select the text for copying.
@Codemycom
@Codemycom 3 жыл бұрын
@@cmputerprgrammer7800 You could bind the label, and then run a function to do whatever you want.
@altaiba3
@altaiba3 3 жыл бұрын
Why doesn't works in python 3.8.6? It shows me package require Tix
@Codemycom
@Codemycom 3 жыл бұрын
You need tix no matter what version of python you use...that’s why I Import it in this video...
@ranjanacharyya4917
@ranjanacharyya4917 3 жыл бұрын
Why tip =Balloon(root) does not work?
@microknigh7
@microknigh7 3 жыл бұрын
So why has this functionality been deprecated with nothing equivalent to replace it?
@microknigh7
@microknigh7 3 жыл бұрын
Haha I posted before finishing the vid. Now I know why it was deprecated LOL
@Codemycom
@Codemycom 3 жыл бұрын
@@microknigh7 lol
@dragoneater2008_
@dragoneater2008_ 3 жыл бұрын
@@microknigh7 why has I’dt been deprecated?
@microknigh7
@microknigh7 3 жыл бұрын
@@dragoneater2008_ Coz it was a crap implementation
@fhtommy
@fhtommy 3 жыл бұрын
Doesn't work for me. _tkinter.TclError: can't find package Tix Hope you will show a different method for this depreciated tool. Thanks so much for these videos!
@sailendrachettri8521
@sailendrachettri8521 3 жыл бұрын
I'm also not able to use this module. I am using Linux mint so, I am able to use this after installed this sudo apt install tix-dev
@altaiba3
@altaiba3 3 жыл бұрын
Can I set an image in the tooltip?
@Codemycom
@Codemycom 3 жыл бұрын
No
@ameyanand1065
@ameyanand1065 3 жыл бұрын
i searched for official documentation but could not find anything tkinter.tix was replaced by tkinter.ttk after python 3.6 but did not find anything in that too :( btw love your videos and first to see this ;) 57 seconds after you uploaded
@Codemycom
@Codemycom 3 жыл бұрын
Yeah there's not much documentation on it
@dsademonslayeramv5763
@dsademonslayeramv5763 Жыл бұрын
It not working in Python 3.11
@Codemycom
@Codemycom Жыл бұрын
yes it is
@khaidemsandip4151
@khaidemsandip4151 3 жыл бұрын
_tkinter.TclError: can't find package Tix on Macos
@Codemycom
@Codemycom 3 жыл бұрын
tix should be lowercase not uppercase
@khaidemsandip4151
@khaidemsandip4151 3 жыл бұрын
@@Codemycom it is lower case and it is still not working. I am actually doing tkinter simple calculator app right now on your videos. Cool videos .
@Codemycom
@Codemycom 3 жыл бұрын
@@khaidemsandip4151 If the error message says capital Tix (as you posted) then somewhere in our app you listed it as capital Tix and need to fix that.
@KrosTurbo
@KrosTurbo 2 жыл бұрын
lol, just chaned from " root = tkinter.Tk() " to " root = Tk " and works well :p thanks for tutorial
@Codemycom
@Codemycom 2 жыл бұрын
it depends on how you imported tkinter
@KornJohnGaming
@KornJohnGaming 3 жыл бұрын
u should do a tutorial of selenium
@Codemycom
@Codemycom 3 жыл бұрын
Noted
@KornJohnGaming
@KornJohnGaming 3 жыл бұрын
@@Codemycom oh and pygame will also be lovely! all of them are like 12 hrs, ur way of teaching is always better
@shaunakn5881
@shaunakn5881 3 жыл бұрын
sEcOnD
@Codemycom
@Codemycom 3 жыл бұрын
Sweet
@eddw123
@eddw123 Жыл бұрын
good to know about old time dusty packages totally deprecated for 2022 🗿
@Codemycom
@Codemycom Жыл бұрын
It's a video from 2000, it may be deprecated but it still works, and you're the one who watched it lol
@samuelmota8213
@samuelmota8213 Жыл бұрын
Error: can't find package Tix
@Codemycom
@Codemycom Жыл бұрын
you either didn't import it or used a capital T instead of lowercase t
@felipeamaralsantos301
@felipeamaralsantos301 3 жыл бұрын
how do i remove that horrible yellow background?
@Codemycom
@Codemycom 3 жыл бұрын
Didn't I address that in the video?
@Thelimbers7
@Thelimbers7 3 жыл бұрын
@@Codemycom No, you didn't
@TheHolsback
@TheHolsback Ай бұрын
not working anymore :(
@Codemycom
@Codemycom Ай бұрын
Yes it is, you typed the code wrong
@devjoinable2
@devjoinable2 3 жыл бұрын
Why anybody doesn't watch to you? :(
@Codemycom
@Codemycom 3 жыл бұрын
Good question!
@devjoinable2
@devjoinable2 3 жыл бұрын
@@Codemycom i think you're good instructor
@Codemycom
@Codemycom 3 жыл бұрын
@@devjoinable2 Thanks!
@ajinkyasonwane4433
@ajinkyasonwane4433 3 жыл бұрын
He is going to have exponential growth, but we are lucky to be here so early.
@Codemycom
@Codemycom 3 жыл бұрын
@@ajinkyasonwane4433 That would be awesome ;-)
@DavidDavid-zm1kj
@DavidDavid-zm1kj Жыл бұрын
self.tool_tip = Balloon() self.tool_tip.configure(bg="blue") for nxt in self.tool_tip.subwidgets_all(): nxt.configure(bg="green") pass
@sirsquirrel0
@sirsquirrel0 Жыл бұрын
FYI - tkinter.tix is depreciated
@Codemycom
@Codemycom Жыл бұрын
Yeah that's what I said in the video lol
Secret Label Copying Hack - Python Tkinter GUI Tutorial #132
10:57
Using tkinter with classes
28:23
Atlas
Рет қаралды 57 М.
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 61 МЛН
Looks realistic #tiktok
00:22
Анастасия Тарасова
Рет қаралды 106 МЛН
Каха заблудился в горах
00:57
К-Media
Рет қаралды 9 МЛН
If __name__ == "__main__" for Python Developers
8:47
Python Simplified
Рет қаралды 391 М.
Use a Drag & Drop Editor to Make Tkinter Python GUI Applications!
11:16
Water powered timers hidden in public restrooms
13:12
Steve Mould
Рет қаралды 291 М.
Python GUI Development With PySimpleGUI
15:15
Real Python
Рет қаралды 1 МЛН
Create Modern Tkinter Button With Icon in Python | Change Image and Text in Buttons in Tkinter GUI
11:00
Mouse Cursor History (and why I made my own)
15:09
Posy
Рет қаралды 2,6 МЛН
Nature's Incredible ROTATING MOTOR (It’s Electric!) - Smarter Every Day 300
29:37
Amazing weight loss transformation !! 😱😱
00:24
Tibo InShape
Рет қаралды 61 МЛН