Home | Trees | Index | Help |
|
---|
Package stripchart :: Module vgradescale :: Class VGradeScale |
|
VGradeZoom
Widget that displays a vertical graduated scale.
This widget provides a vertical scale that uses agtk.Adjustment
as its data model. The value
of
the adjustment
is interpreted as the lower
value displayed, while the page_size
of the adjustment
is the range that is displayed.
ie:
lower bound shown on scale = value upper bound shown on scale = value + page_sizeFor example, the following code sets the vertical range so that its minimum displayed value is
-200.0
and its maximum displayed
value is 200.0
:
>>> import gtk, vgradescale
>>> v = vgradescale.VGradeScale()
>>> v.adjustment = gtk.Adjustment(-200, -1000, 1000, 1, 10, 400)
The widget is based upon gtk.DrawingArea
. Because PyGTK
widgets cannot be subclassed and used directly, the
gtk.DrawingArea
is stored in a class variable called widget
.
Method Summary | |
---|---|
Initializes the widget. | |
Delete attributes method. | |
Set attributes method. | |
Set the gtk.Adjustment used as the data model. | |
Set the background color of the component. |
Instance Variable Summary | |
---|---|
gtk.Adjustment |
adjustment : Data model for the component. |
Tuple of (r, g, b) values in the range from 0
to
|
bgcolor : Background color of the component. |
gtk.DrawingArea |
widget : Read only pseudo-parent widget of the class. |
Method Details |
---|
__init__(self,
adjustment=None)
Initializes the widget.
|
__delattr__(self, name)Delete attributes method. |
__setattr__(self, name, value)Set attributes method. |
set_adjustment(self, adjustment)Set the If object.adjustment = adjustmentEG: >>> import gtk, vgradescale >>> v = vgradescale.VGradeScale() >>> a1 = gtk.Adjustment() >>> a2 = gtk.Adjustment() >>> v.set_adjustment(a1) >>> v.adjustment is a1 1 >>> v.adjustment = a2 >>> v.adjustment is a2 1 >>> v.adjustment is a1 0
|
set_bgcolor(self, color)Set the background color of the component. Color should be of the tuple form: object.bgcolor = (r, g, b)EG: >>> import vgradescale >>> v = vgradescale.VGradeScale() >>> v.bgcolor (65535, 65535, 65535) >>> v.set_bgcolor((1, 2, 3)) >>> v.bgcolor (1, 2, 3) >>> v.bgcolor = (1000, 2000, 3000) >>> v.bgcolor (1000, 2000, 3000)
|
Instance Variable Details |
---|
adjustmentData model for the component.
|
bgcolorBackground color of the component.
|
widgetRead only pseudo-parent widget of the class.
|
Home | Trees | Index | Help |
|
---|
Generated by Epydoc 2.0 on Sat Oct 25 11:04:43 2003 | http://epydoc.sf.net |