Class: TK::Button

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

Instance Method Summary collapse

Constructor Details

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

Returns a new instance of Button.



47
48
49
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 47

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

Instance Method Details

#is_enabledObject



55
56
57
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 55

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

#set_enabled(enabled) ⇒ Object



51
52
53
# File 'lib/wiki_lyrics/gui/gui-tk.rb', line 51

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