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

Class SpaceWidget

source code

  object --+    
           |    
CanvasWidget --+
               |
              SpaceWidget

A canvas widget that takes up space but does not display anything. SpaceWidgets can be used to add space between elements. Each space widget is characterized by a width and a height. If you wish to only create horizontal space, then use a height of zero; and if you wish to only create vertical space, use a width of zero.

Instance Methods [hide private]
 
__init__(self, canvas, width, height, **attribs)
Create a new space widget.
source code
string
__repr__(self)
Returns: a string representation of this canvas widget.
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_height(self, height)
Change the height of this space widget.
source code
None
set_width(self, width)
Change the width of this space widget.
source code

Inherited from CanvasWidget: __getitem__, __setitem__, 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]

__init__(self, canvas, width, height, **attribs)
(Constructor)

source code 

Create a new space widget.

Parameters:
  • canvas (Tkinter.Canvas) - This canvas widget's canvas.
  • width (int) - The width of the new space widget.
  • height (int) - The height of the new space widget.
  • 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)

_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_height(self, height)

source code 

Change the height of this space widget.

Parameters:
  • height (int) - The new height.
Returns: None

set_width(self, width)

source code 

Change the width of this space widget.

Parameters:
  • width (int) - The new width.
Returns: None