Attempts to set the vertical scroll postition for an element's Widget :param percent_from_top: From 0 to 1.0, the percentage from the top to move scrollbar to :type percent_from_top: (float)
(self, percent_from_top)
| 1696 | print(e) |
| 1697 | |
| 1698 | def set_vscroll_position(self, percent_from_top): |
| 1699 | """ |
| 1700 | Attempts to set the vertical scroll postition for an element's Widget |
| 1701 | :param percent_from_top: From 0 to 1.0, the percentage from the top to move scrollbar to |
| 1702 | :type percent_from_top: (float) |
| 1703 | """ |
| 1704 | if self.Type == ELEM_TYPE_COLUMN and self.Scrollable: |
| 1705 | widget = self.widget.canvas # scrollable column is a special case |
| 1706 | else: |
| 1707 | widget = self.widget |
| 1708 | |
| 1709 | try: |
| 1710 | widget.yview_moveto(percent_from_top) |
| 1711 | except Exception as e: |
| 1712 | print('Warning setting the vertical scroll (yview_moveto failed)') |
| 1713 | print(e) |
| 1714 | |
| 1715 | |
| 1716 | def set_hscroll_position(self, percent_from_left): |
no outgoing calls
no test coverage detected