1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/tk/lib/tk/*: untabify

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nagai 2004-10-11 04:51:21 +00:00
parent 05f5928c9d
commit 3514110b89
296 changed files with 13591 additions and 13558 deletions

View file

@ -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)
}