Class: TK::CheckBox

Inherits:
TkCheckButton
  • Object
show all
Defined in:
lib/wiki_lyrics/gui/gui-tk.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent, text, *args) ⇒ CheckBox

Returns a new instance of CheckBox.



317
318
319
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 317

def initialize( parent, text, *args )
	super( parent, TK.proc_args( args, { "text"=> text } ) )
end

Instance Method Details

#get_valueObject Also known as: value, is_checked, get_checked, checked



329
330
331
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 329

def get_value()
	super() != "0"
end

#is_enabledObject



325
326
327
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 325

def is_enabled()
	return state() != "disabled"
end

#set_enabled(enabled) ⇒ Object



321
322
323
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 321

def set_enabled( enabled )
	self.state = enabled ? "normal" : "disabled"
end