Example #1
0
 def get_selection(self):
     (
         pos,
         anchor,
     ) = _appuifw2.Text2_get_selection(self._uicontrolapi)
     i = min(pos, anchor)
     j = max(pos, anchor)
     return (pos, anchor,
             _appuifw2.Text2_get_text(self._uicontrolapi, i, (j - i)))
 def __getslice__(self, i, j):
     ln = len(self)
     i = min(ln, max(0, i))
     j = min(ln, max(i, j))
     return _appuifw2.Text2_get_text(self._uicontrolapi, i, j - i)
 def __getitem__(self, i):
     return _appuifw2.Text2_get_text(self._uicontrolapi, i, 1)
 def get(self, pos=0, length=-1):
     return _appuifw2.Text2_get_text(self._uicontrolapi, pos, length)