def display_help(self, topics, lines):
import urwid
from ...tui.scroll import (Scrollable, ScrollBar)
if hasattr(self, 'title'):
titlew = make_tab_title_widget(str(self.title),
attr_unfocused='tabs.help.unfocused',
attr_focused='tabs.help.focused')
else:
titlew = make_tab_title_widget(','.join(topics),
attr_unfocused='tabs.help.unfocused',
attr_focused='tabs.help.focused')
textw = urwid.AttrMap(Scrollable(urwid.Text('\n'.join(lines))), 'helptext')
contentw = urwid.AttrMap(ScrollBar(textw), 'scrollbar')
self.tui.tabs.load(titlew, contentw)
评论列表
文章目录