0

Hi I want to set inside the tooltip an image Is this possible?

from tkinter import*
from tkinter.tix import*
from utils import get_path


root =Tk()
root.title('hola')
root.geometry("500x500")

tip = Balloon(root)
tip.config(bg='grey')

tip.label.config(bg='red',fg='white',bd=2)

path_img=get_path('images')

image_tip= PhotoImage(file = path_img+'blueTP.png')
mylabel= Label(root,text='MOS',image=image_tip)
mylabel.pack(pady=50)



tip.bind_widget(mylabel,balloonmsg='MOS stands for "Mean Opinion Score" \n and it calculates the quality of internet service to provide the best audio quality to our customers. \n\n Formula; 1 * 0.035* R + 0.000007* R *(R-60) * (100-R)')

root.mainloop()

But I want to the image displays inside the balloon, is this possible?

I have this:

enter image description here

but I need something like this:

enter image description here

Barbora
  • 921
  • 1
  • 6
  • 11

1 Answers1

0

Result

from tkinter import*
from tkinter.tix import*
from utils import get_setting,get_agentSettings,get_botSettings,get_path,whoami,myOs,get_netLogin
    
    
root =Tk()
root.title('hola')
root.geometry("500x500")

tip = Balloon(root)
tip.config(bg='grey')
path_img=get_path('images')

image_tip= PhotoImage(file = path_img+'blueTP.png')
tip.label.config(bg='red',fg='white',bd=15,image=image_tip)


mylabel= Label(root,text='MOS')
mylabel.pack(pady=50)



tip.bind_widget(mylabel,balloonmsg='MOS stands for "Mean Opinion Score" \n and it calculates the quality of internet service to provide the best audio quality to our customers. \n\n Formula; 1 * 0.035* R + 0.000007* R *(R-60) * (100-R)')

root.mainloop()