[Tutor] gui tks and encodings
alan.gauld at blueyonder.co.uk
Wed Jun 2 02:55:22 EDT 2004
> but could you tell me why do i always get 0, 0, 0, 0 for
> print text_widget.bbox('insert') ?
Not without knowing more about what's inside the text box.
The manual says of bbox:
Return a list of 4 numbers giving x,y,width and height (relative
to the widget) of the visible area occupied by the character
at the index. If the character is not visible an empty list is
So if there were no characters in the text box you would
indeed get 0,0,0,0.
But if you insert some characters and move the insert into the
middle of them, then you should get a different result.
More information about the Tutor