Class: TK::SpinBox
- Inherits:
-
TkSpinbox
- Object
- TkSpinbox
- TK::SpinBox
- Defined in:
- lib/wiki_lyrics/gui/gui-tk.rb
Instance Method Summary collapse
- #get_max_value ⇒ Object (also: #max_value)
- #get_min_value ⇒ Object (also: #min_value)
- #get_value ⇒ Object (also: #value)
-
#initialize(parent, value, *args) ⇒ SpinBox
constructor
A new instance of SpinBox.
- #is_enabled ⇒ Object
- #set_enabled(enabled) ⇒ Object
- #set_max_value(max_value) ⇒ Object (also: #max_value=)
- #set_min_value(min_value) ⇒ Object (also: #min_value=)
- #set_range(min_value, max_value) ⇒ Object
- #set_value(value) ⇒ Object (also: #value=)
Constructor Details
Instance Method Details
#get_max_value ⇒ Object Also known as: max_value
192 193 194 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 192 def get_max_value() return self.to end |
#get_min_value ⇒ Object Also known as: min_value
184 185 186 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 184 def get_min_value() return self.from end |
#get_value ⇒ Object Also known as: value
176 177 178 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 176 def get_value() @variable.value() end |
#is_enabled ⇒ Object
172 173 174 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 172 def is_enabled() return state() != "disabled" end |
#set_enabled(enabled) ⇒ Object
168 169 170 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 168 def set_enabled( enabled ) self.state = enabled ? "normal" : "disabled" end |
#set_max_value(max_value) ⇒ Object Also known as: max_value=
196 197 198 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 196 def set_max_value( max_value ) self.to = max_value end |
#set_min_value(min_value) ⇒ Object Also known as: min_value=
188 189 190 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 188 def set_min_value( min_value ) self.from = min_value end |
#set_range(min_value, max_value) ⇒ Object
200 201 202 203 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 200 def set_range( min_value, max_value ) set_max_value( max_value ) set_min_value( min_value ) end |
#set_value(value) ⇒ Object Also known as: value=
180 181 182 |
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 180 def set_value( value ) @variable.set_value( value ) end |