2
# two image widgets demo (called by 'widget')
5
# toplevel widget ��¸�ߤ���к������
6
if defined?($image1_demo) && $image1_demo
11
# demo �Ѥ� toplevel widget ������
12
$image1_demo = TkToplevel.new {|w|
13
title('Image Demonstration #1')
19
msg = TkLabel.new($image1_demo) {
23
text "���Υǥ�Ǥ�2�ĤΥ�٥��˲����줾��ɽ�����Ƥ��ޤ���"
25
msg.pack('side'=>'top')
28
TkFrame.new($image1_demo) {|frame|
33
tmppath = $image1_demo
37
}.pack('side'=>'left', 'expand'=>'yes')
41
command proc{showCode 'image1'}
42
}.pack('side'=>'left', 'expand'=>'yes')
44
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
48
TkPhotoImage.new('file'=>[$demo_dir,'..',
49
'images','earth.gif'].join(File::Separator))
51
TkPhotoImage.new('file'=>[$demo_dir,'..',
52
'images','earthris.gif'].join(File::Separator))
55
[ TkLabel.new($image1_demo, 'image'=>image1a, 'bd'=>1, 'relief'=>'sunken'),
56
TkLabel.new($image1_demo, 'image'=>image1b, 'bd'=>1, 'relief'=>'sunken')
57
].each{|w| w.pack('side'=>'top', 'padx'=>'.5m', 'pady'=>'.5m')}