Skip to content

Coding tips

Bernd Klein edited this page Nov 6, 2018 · 16 revisions

Using ToolTips

Since version 0.10 it is possible to use tooltips for entry widgets. See below code snippet

w99 = FloatEntry(self.frmButtonsIndividualContent, width=10,\ textvariable=self.__safety_Z, mandatory=False)<br> w99.grid(row=row, column=3, sticky=W)<br> ToolTip(w99, text="move Z to this value if finished")

Save object into a variable. Via this variable you can put the widget into your grid and use the reference for your tooltip. You can use more parameters for the ToolTip

def __init__(self, widget,<br> bg='#FFFFEA',<br> pad=(5, 3, 5, 3),<br> text='widget info',<br> waittime=400,<br> wraplength=250)

Clone this wiki locally