Package nltk :: Package draw :: Class TextWidget
[hide private]
[frames] | no frames]

Class TextWidget

source code

  object --+    
           |    
CanvasWidget --+
               |
              TextWidget
Known Subclasses:

A canvas widget that displays a single string of text.

Attributes:

Instance Methods [hide private]
(any)
__getitem__(self, attr)
Returns: the value of the attribute attr.
source code
 
__init__(self, canvas, text, **attribs)
Create a new text widget.
source code
string
__repr__(self)
Returns: a string representation of this canvas widget.
source code
None
__setitem__(self, attr, value)
Set the value of the attribute attr to value.
source code
list of int
_tags(self)
Returns: a list of canvas tags for all graphical elements managed by this canvas widget, not including graphical elements managed by its child widgets.
source code
None
set_text(self, text)
Change the text that is displayed by this text widget.
source code
string
text(self)
Returns: The text displayed by this text widget.
source code

Inherited from CanvasWidget: bbox, bind_click, bind_drag, canvas, child_widgets, destroy, height, hidden, hide, manage, move, moveto, parent, show, tags, unbind_click, unbind_drag, update, width

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__getitem__(self, attr)
(Indexing operator)

source code 
Returns: (any)
the value of the attribute attr. See the class documentation for a list of attributes supported by this canvas widget.
Overrides: CanvasWidget.__getitem__
(inherited documentation)

__init__(self, canvas, text, **attribs)
(Constructor)

source code 

Create a new text widget.

Parameters:
  • canvas (Tkinter.Canvas) - This canvas widget's canvas.
  • text (string) - The string of text to display.
  • attribs - The new canvas widget's attributes.
Overrides: CanvasWidget.__init__

__repr__(self)
(Representation operator)

source code 

repr(x)

Returns: string
a string representation of this canvas widget.
Overrides: CanvasWidget.__repr__
(inherited documentation)

__setitem__(self, attr, value)
(Index assignment operator)

source code 

Set the value of the attribute attr to value. See the class documentation for a list of attributes supported by this canvas widget.

Returns: None
Overrides: CanvasWidget.__setitem__
(inherited documentation)

_tags(self)

source code 
Returns: list of int
a list of canvas tags for all graphical elements managed by this canvas widget, not including graphical elements managed by its child widgets.
Overrides: CanvasWidget._tags
(inherited documentation)

set_text(self, text)

source code 

Change the text that is displayed by this text widget.

Parameters:
  • text (string) - The string of text to display.
Returns: None

text(self)

source code 
Returns: string
The text displayed by this text widget.