hildon.NumberEditor
A widget used to set a number.
Description
hildon.NumberEditor
is used to set a number from a specific range. There are two buttons
to scroll the value in the number field and manual input is also possible.
Ancestry
Up to the first non-hildon ancestor:
... +-- gtk.Container +-- hildon.NumberEditor
Usage Example
import gtk import hildon window = hildon.Window() window.set_title("Test App") number_editor = hildon.NumberEditor(0, 10) number_editor.set_value(5) window.add(number_editor) window.show_all() gtk.main()
Properties
Name | Access | Description |
---|---|---|
"value" |
Read/Write | The current value of number editor. |
Constructor
Creates new number editor with a given range (minimum and maximum allowable values).
hildon.NumberEditor(min, max)
|
|
---|---|
min |
Minimum allowable value. |
max |
Maximum allowable value. |
Returns | A new hildon.NumberEditor widget. |
Methods
set_range
Sets the editor's number range.
hildon.NumberEditor.set_range(min, max)
|
|
---|---|
min |
Minimum allowable value. |
max |
Maximum allowable value. |
get_value
Gets its current value.
hildon.NumberEditor.get_value()
|
|
---|---|
Returns | Editor's current value. |
set_value
Sets its current value.
hildon.NumberEditor.set_value(value)
|
|
---|---|
value |
Editor's current value. |
Improve this page