def render(self, strong=False):
(y, x) = self.window.getmaxyx()
label_str = " {} ".format(self._label)
addstr_params = [
self.row, self.label_col, " {} ".format(self._label),
curses.color_pair(self.color_index) if curses.has_colors() else 0
]
# heading attributes
attrs = curses.color_pair(self.color_index) if curses.has_colors() else 0
if strong:
attrs |= curses.A_BOLD
self.window.hline(0, 0, curses.ACS_HLINE, x)
self.window.addstr(self.row, self.label_col, " {} ".format(self._label), attrs)
评论列表
文章目录