Closed ElLoko233 closed 3 years ago
@ElLoko233 You override the internal method, removing all code from it. Naturally this won't work. You need to do it like this:
class ProductScreener(Screen, MDTabsBase):
orgDisplay = ObjectProperty()
title = StringProperty(name="title")
original_ingredients = DictProperty()
def on_text(self, widget, text):
print('hello', )
# Set the icon
if text in md_icons:
self.tab_label.font_name = (
fonts_path + "materialdesignicons-webfont.ttf"
)
self.tab_label.text = md_icons[self.text]
self.tab_label.font_size = "24sp"
# Set the label text
else:
self.tab_label.text = self.text
Description of the Bug
When I use the on_text event to print text to my console the tab text on the app disappears and a new empty tab is addded.
Code and Logs
Screenshots
Versions