MCPcopy Create free account
hub / github.com/TabViewer/tabview / toggle_column_width

Method toggle_column_width

tabview/tabview.py:599–613  ·  view source on GitHub ↗

Toggle column width mode between 'mode' and 'max' or set fixed column width mode if self.modifier is set.

(self)

Source from the content-addressed store, hash-verified

597 return repr(type(value)), value
598
599 def toggle_column_width(self):
600 """Toggle column width mode between 'mode' and 'max' or set fixed
601 column width mode if self.modifier is set.
602
603 """
604 try:
605 self.column_width_mode = min(int(self.modifier), self.max_x)
606 self.modifier = str()
607 except ValueError:
608 if self.column_width_mode == 'mode':
609 self.column_width_mode = 'max'
610 else:
611 self.column_width_mode = 'mode'
612 self._get_column_widths(self.column_width_mode)
613 self.recalculate_layout()
614
615 def set_current_column_width(self):
616 xs = self.win_x + self.x

Callers

nothing calls this directly

Calls 2

_get_column_widthsMethod · 0.95
recalculate_layoutMethod · 0.95

Tested by

no test coverage detected