diff options
Diffstat (limited to 'ext/tk/sample/demos-en/spin.rb')
-rw-r--r-- | ext/tk/sample/demos-en/spin.rb | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/ext/tk/sample/demos-en/spin.rb b/ext/tk/sample/demos-en/spin.rb index 5d32454170..58616b1e02 100644 --- a/ext/tk/sample/demos-en/spin.rb +++ b/ext/tk/sample/demos-en/spin.rb @@ -16,8 +16,8 @@ $spin_demo = TkToplevel.new {|w| } TkLabel.new($spin_demo, - :font=>$font, :wraplength=>'5i', :justify=>:left, - :text=><<EOL).pack(:side=>:top) + :font=>$font, :wraplength=>'5i', :justify=>:left, + :text=><<EOL).pack(:side=>:top) Three different spin-boxes are displayed below. \ You can add characters by pointing, clicking and typing. \ The normal Motif editing characters are supported, along with \ @@ -38,13 +38,13 @@ TkFrame.new($spin_demo){|f| pack(:side=>:bottom, :fill=>:x, :pady=>'2m') TkButton.new(f, :text=>'Dismiss', :width=>15, :command=>proc{ - $spin_demo.destroy - $spin_demo = nil - }).pack(:side=>:left, :expand=>true) + $spin_demo.destroy + $spin_demo = nil + }).pack(:side=>:left, :expand=>true) TkButton.new(f, :text=>'See Code', :width=>15, :command=>proc{ - showCode 'spin' - }).pack(:side=>:left, :expand=>true) + showCode 'spin' + }).pack(:side=>:left, :expand=>true) } australianCities = [ @@ -54,10 +54,10 @@ australianCities = [ [ TkSpinbox.new($spin_demo, :from=>1, :to=>10, :width=>10, :validate=>:key, - :validatecommand=>[ - proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P' - ]), + :validatecommand=>[ + proc{|s| s == '' || /^[+-]?\d+$/ =~ s }, '%P' + ]), TkSpinbox.new($spin_demo, :from=>0, :to=>3, :increment=>0.5, - :format=>'%05.2f', :width=>10), + :format=>'%05.2f', :width=>10), TkSpinbox.new($spin_demo, :values=>australianCities, :width=>10) ].each{|sbox| sbox.pack(:side=>:top, :pady=>5, :padx=>10)} |