A scrollbar that is automatically hidden when not needed. Only the grid geometry manager is supported.
| 10 | |
| 11 | |
| 12 | class AutoHideScrollbar(Scrollbar): |
| 13 | """A scrollbar that is automatically hidden when not needed. |
| 14 | |
| 15 | Only the grid geometry manager is supported. |
| 16 | """ |
| 17 | def set(self, lo, hi): |
| 18 | if float(lo) > 0.0 or float(hi) < 1.0: |
| 19 | self.grid() |
| 20 | else: |
| 21 | self.grid_remove() |
| 22 | super().set(lo, hi) |
| 23 | |
| 24 | def pack(self, **kwargs): |
| 25 | raise TclError(f'{self.__class__.__name__} does not support "pack"') |
| 26 | |
| 27 | def place(self, **kwargs): |
| 28 | raise TclError(f'{self.__class__.__name__} does not support "place"') |
| 29 | |
| 30 | |
| 31 | class ScrollableTextFrame(Frame): |
no outgoing calls
no test coverage detected
searching dependent graphs…