mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
Added a feature for chaning label textBG
This commit is contained in:
parent
4422db649b
commit
385249cfa2
@ -386,7 +386,8 @@ class TreeNode:
|
||||
self.label.configure(fg="white", bg="red")
|
||||
else:
|
||||
fg = self.item.GetTextFg()
|
||||
self.label.configure(fg=fg, bg="white")
|
||||
bg = self.item.GetTextBg()
|
||||
self.label.configure(fg=fg, bg=bg)
|
||||
id = self.canvas.create_window(textx, texty,
|
||||
anchor="nw", window=self.label)
|
||||
self.label.bind("<1>", self.select_or_edit)
|
||||
@ -486,6 +487,9 @@ class TreeItem:
|
||||
def GetTextFg(self):
|
||||
return "black"
|
||||
|
||||
def GetTextBg(self):
|
||||
return "white"
|
||||
|
||||
def GetLabelText(self):
|
||||
"""Return label text string to display in front of text (if any)."""
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user