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)
w99.grid(row=row, column=3, sticky=W)
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,
bg='#FFFFEA',
pad=(5, 3, 5, 3),
text='widget info',
waittime=400,
wraplength=250)

Clone this wiki locally