mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9b52ae2e64
commit
287a34ae0d
856 changed files with 13989 additions and 13989 deletions
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
# toplevel widget が存在すれば削除する
|
||||
if defined?($msgbox_demo) && $msgbox_demo
|
||||
$msgbox_demo.destroy
|
||||
$msgbox_demo.destroy
|
||||
$msgbox_demo = nil
|
||||
end
|
||||
|
||||
|
|
@ -48,9 +48,9 @@ TkFrame.new(base_frame) {|frame|
|
|||
# frame 生成
|
||||
$msgbox_leftframe = TkFrame.new(base_frame)
|
||||
$msgbox_rightframe = TkFrame.new(base_frame)
|
||||
$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
|
||||
$msgbox_leftframe .pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
|
||||
'pady'=>'.5c', 'padx'=>'.5c')
|
||||
$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
|
||||
$msgbox_rightframe.pack('side'=>'left', 'expand'=>'yes', 'fill'=>'y',
|
||||
'pady'=>'.5c', 'padx'=>'.5c')
|
||||
|
||||
TkLabel.new($msgbox_leftframe, 'text'=>'アイコン').pack('side'=>'top')
|
||||
|
|
@ -59,9 +59,9 @@ TkFrame.new($msgbox_leftframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
|
|||
|
||||
$msgboxIcon = TkVariable.new('info')
|
||||
['error', 'info', 'question', 'warning'].each {|icon|
|
||||
TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon,
|
||||
'relief'=>'flat', 'value'=>icon, 'width'=>16,
|
||||
'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
|
||||
TkRadioButton.new($msgbox_leftframe, 'text'=>icon, 'variable'=>$msgboxIcon,
|
||||
'relief'=>'flat', 'value'=>icon, 'width'=>16,
|
||||
'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
|
||||
'anchor'=>'w', 'fill'=>'x')
|
||||
}
|
||||
|
||||
|
|
@ -70,20 +70,20 @@ TkFrame.new($msgbox_rightframe, 'relief'=>'ridge', 'bd'=>1, 'height'=>2)\
|
|||
.pack('side'=>'top', 'fill'=>'x', 'expand'=>'no')
|
||||
|
||||
$msgboxType = TkVariable.new('ok')
|
||||
['abortretryignore', 'ok', 'okcancel',
|
||||
['abortretryignore', 'ok', 'okcancel',
|
||||
'retrycancel', 'yesno', 'yesnocancel'].each {|type|
|
||||
TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType,
|
||||
'relief'=>'flat', 'value'=>type, 'width'=>16,
|
||||
'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
|
||||
TkRadioButton.new($msgbox_rightframe, 'text'=>type, 'variable'=>$msgboxType,
|
||||
'relief'=>'flat', 'value'=>type, 'width'=>16,
|
||||
'anchor'=>'w').pack('side'=>'top', 'pady'=>2,
|
||||
'anchor'=>'w', 'fill'=>'x')
|
||||
}
|
||||
|
||||
def showMessageBox(w)
|
||||
button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
|
||||
button = Tk.messageBox('icon'=>$msgboxIcon.value, 'type'=>$msgboxType.value,
|
||||
'title'=>'Message', 'parent'=>w,
|
||||
'message'=>"これは\"#{$msgboxType.value}\"という種類のメッセージボックスで、\"#{$msgboxIcon.value}\"のアイコンが表示されています。")
|
||||
|
||||
Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
|
||||
Tk.messageBox('icon'=>'info', 'type'=>'ok', 'parent'=>w,
|
||||
'message'=>"あなたは \"#{button}\" を押しましたね。")
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue