diff options
| author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
|---|---|---|
| committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-10-11 04:51:21 +0000 |
| commit | 7554d0b06f53969d56402f3343c35063a7b4b56a (patch) | |
| tree | 81258b81d9111c762cb80ca56141cd1f8ce9d0f9 /ext/tk/sample/binding_sample.rb | |
| parent | d3caa0ae0ba3a85108ff11919b227a2ddcf290eb (diff) | |
| download | ruby-7554d0b06f53969d56402f3343c35063a7b4b56a.tar.gz ruby-7554d0b06f53969d56402f3343c35063a7b4b56a.tar.xz ruby-7554d0b06f53969d56402f3343c35063a7b4b56a.zip | |
* ext/tk/lib/tk/*: untabify
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/sample/binding_sample.rb')
| -rw-r--r-- | ext/tk/sample/binding_sample.rb | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/ext/tk/sample/binding_sample.rb b/ext/tk/sample/binding_sample.rb index b98cd66a2..693cc7de2 100644 --- a/ext/tk/sample/binding_sample.rb +++ b/ext/tk/sample/binding_sample.rb @@ -24,17 +24,17 @@ class Button_clone < TkLabel self.bind('Enter', proc{self.background(self.activebackground)}) self.bind('Leave', proc{ - @press = false - self.background(self.highlightbackground) - self.relief('raised') - }) + @press = false + self.background(self.highlightbackground) + self.relief('raised') + }) self.bind('ButtonPress-1', proc{@press = true; self.relief('sunken')}) self.bind('ButtonRelease-1', proc{ - self.relief('raised') - @command.call if @press && @command - @press = false - }) + self.relief('raised') + @command.call if @press && @command + @press = false + }) end def command(cmd = Proc.new) @@ -67,20 +67,20 @@ TkFrame.new{|f| }.pack TkButton.new(:text=>'normal Button widget', - :command=>proc{ - puts 'button is clicked!!' - lbl.text 'button is clicked!!' - v.numeric += 1 - }){ + :command=>proc{ + puts 'button is clicked!!' + lbl.text 'button is clicked!!' + v.numeric += 1 + }){ pack(:fill=>:x, :expand=>true) } Button_clone.new(:text=>'Label with Button binding', - :command=>proc{ - puts 'label is clicked!!' - lbl.text 'label is clicked!!' - v.numeric += 1 - }){ + :command=>proc{ + puts 'label is clicked!!' + lbl.text 'label is clicked!!' + v.numeric += 1 + }){ pack(:fill=>:x, :expand=>true) } |
