File "c:\Users\daniel.vieira\Desktop\AiUni\App\app\Faturamento\Fat_import.py", line 665, in Show_desc
self.tip_row=CTkToolTip(self.tree.identify_row(event.y), message=f"{self.values[3]}")
File "C:\Users\daniel.vieira\Anaconda3\lib\site-packages\CTkToolTip\ctk_tooltip.py", line 42, in init
self.transparent_color = self.widget._apply_appearance_mode(
AttributeError: 'str' object has no attribute '_apply_appearance_mode'
@DanielVieira326 CTkTooltip is only for customtkinter widgets and will not work with tkinter ones (like treeview). For tkinter widgets you can use this tooltip: https://github.com/gnikit/tkinter-tooltip
Code:
self.tree.bind("", self.Show_desc)
def Show_desc(self,event):#tree.bind("", Show_desc)
self.y = self.tree.identify_row(event.y)
self.x = self.tree.identify_column(event.x)
self.prevalues=self.tree.item(self.y)
self.values=self.prevalues['values']
if self.x =="#2":
self.tip_row=CTkToolTip(self.tree.identify_row(event.y), message=f"{self.values[1]}")
if self.x =="#4":
self.tip_row=CTkToolTip(self.tree.identify_row(event.y), message=f"{self.values[3]}")
Error:
File "c:\Users\daniel.vieira\Desktop\AiUni\App\app\Faturamento\Fat_import.py", line 665, in Show_desc self.tip_row=CTkToolTip(self.tree.identify_row(event.y), message=f"{self.values[3]}") File "C:\Users\daniel.vieira\Anaconda3\lib\site-packages\CTkToolTip\ctk_tooltip.py", line 42, in init self.transparent_color = self.widget._apply_appearance_mode( AttributeError: 'str' object has no attribute '_apply_appearance_mode'