INNER CODE UNIT · Python
on_tabs_tab_activated
antoniorodr/cronboard · src/cronboard/app.py:164
def on_tabs_tab_activated(self, event: Tabs.TabActivated) -> None:
"""Shows the content for the activated tab.
Args:
event: Tabs.TabActivated object. Identifies the activated tab.
"""
tab_label: Content = event.tab.label
if tab_label == "Local":
self.show_tab_content(0)
elif tab_label == "Servers":
self.show_tab_content(1)
elif tab_label == "Settings":
self.show_tab_content(2)
def show_tab_content(self, index: int) -> None:
"""Shows the content for the tab at the given index.