mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge branch 'tk_utf8' into trunk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33271 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9da539cce9
commit
2fecb27eb4
87 changed files with 2348 additions and 2344 deletions
|
@ -1,4 +1,4 @@
|
|||
# -*- coding: euc-jp -*-
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# ttkpane.rb --
|
||||
#
|
||||
|
@ -21,9 +21,9 @@ base_frame = TkFrame.new($ttkpane_demo).pack(:fill=>:both, :expand=>true)
|
|||
|
||||
Ttk::Label.new(base_frame, :font=>$font, :wraplength=>'4i', :justify=>:left,
|
||||
:text=><<EOL).pack(:side=>:top, :fill=>:x)
|
||||
このデモは,埋め込み関係にあるテーマ付きペインドウィンドウを示しています.\
|
||||
それぞれの大きさは,含まれているペインの間にあるエリアをつかんで\
|
||||
境界をドラッグすることで変更できます.
|
||||
このデモは,埋め込み関係にあるテーマ付きペインドウィンドウを示しています.\
|
||||
それぞれの大きさは,含まれているペインの間にあるエリアをつかんで\
|
||||
境界をドラッグすることで変更できます.
|
||||
EOL
|
||||
|
||||
Ttk::Separator.new(base_frame).pack(:side=>:top, :fill=>:x)
|
||||
|
@ -33,10 +33,10 @@ Ttk::Frame.new(base_frame) {|frame|
|
|||
sep = Ttk::Separator.new(frame)
|
||||
Tk.grid(sep, :columnspan=>4, :row=>0, :sticky=>'ew', :pady=>2)
|
||||
TkGrid('x',
|
||||
Ttk::Button.new(frame, :text=>'コード参照',
|
||||
Ttk::Button.new(frame, :text=>'コード参照',
|
||||
:image=>$image['view'], :compound=>:left,
|
||||
:command=>proc{showCode 'ttkpane'}),
|
||||
Ttk::Button.new(frame, :text=>'閉じる',
|
||||
Ttk::Button.new(frame, :text=>'閉じる',
|
||||
:image=>$image['delete'], :compound=>:left,
|
||||
:command=>proc{
|
||||
$ttkpane_demo.destroy
|
||||
|
@ -52,19 +52,19 @@ frame = Ttk::Frame.new(base_frame).pack(:fill=>:both, :expand=>true)
|
|||
outer = Ttk::Panedwindow.new(frame, :orient=>:horizontal)
|
||||
outer.add(in_left = Ttk::Panedwindow.new(outer, :orient=>:vertical))
|
||||
outer.add(in_right = Ttk::Panedwindow.new(outer, :orient=>:vertical))
|
||||
in_left.add(left_top = Ttk::Labelframe.new(in_left, :text=>'ボタン'))
|
||||
in_left.add(left_bot = Ttk::Labelframe.new(in_left, :text=>'時計'))
|
||||
in_right.add(right_top = Ttk::Labelframe.new(in_right, :text=>'プログレス'))
|
||||
in_right.add(right_bot = Ttk::Labelframe.new(in_right, :text=>'テキスト'))
|
||||
in_left.add(left_top = Ttk::Labelframe.new(in_left, :text=>'ボタン'))
|
||||
in_left.add(left_bot = Ttk::Labelframe.new(in_left, :text=>'時計'))
|
||||
in_right.add(right_top = Ttk::Labelframe.new(in_right, :text=>'プログレス'))
|
||||
in_right.add(right_bot = Ttk::Labelframe.new(in_right, :text=>'テキスト'))
|
||||
if Tk.windowingsystem == 'aqua'
|
||||
[left_top, left_bot, right_top, right_bot].each{|w| w.padding(3) }
|
||||
end
|
||||
|
||||
# Fill the button pane
|
||||
Ttk::Button.new(left_top, :text=>'押してね',
|
||||
Ttk::Button.new(left_top, :text=>'押してね',
|
||||
:command=>proc{
|
||||
Tk.messageBox(:type=>'ok', :icon=>'info',
|
||||
:message=>'いてて!',
|
||||
:message=>'いてて!',
|
||||
:detail=>'That hurt...', :parent=>base_frame,
|
||||
:title=>'Button Pressed')
|
||||
}).pack(:padx=>2, :pady=>5)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue