2
# listbox widget demo 'states' (called by 'widget')
5
# toplevel widget ��¸�ߤ���к������
6
if defined?($states_demo) && $states_demo
11
# demo �Ѥ� toplevel widget ������
12
$states_demo = TkToplevel.new {|w|
13
title("Listbox Demonstration (states)")
19
msg = TkLabel.new($states_demo) {
23
text "���ˤ���Τ���ƻ�ܸ�̾�����ä�����������С��դΥꥹ�ȥܥå����Ǥ����ꥹ�Ȥ������뤵����Τϥ���������С��Ǥ�Ǥ��ޤ������ꥹ�ȥܥå�������ǥޥ����Υܥ���2(��ܥ���)�����ޤޥɥ�å����Ƥ�Ǥ��ޤ���"
25
msg.pack('side'=>'top')
28
TkFrame.new($states_demo) {|frame|
33
tmppath = $states_demo
37
}.pack('side'=>'left', 'expand'=>'yes')
41
command proc{showCode 'states'}
42
}.pack('side'=>'left', 'expand'=>'yes')
44
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
48
TkFrame.new($states_demo, 'borderwidth'=>'.5c') {|w|
49
s = TkScrollbar.new(w)
50
states_lbox = TkListbox.new(w) {
53
yscrollcommand proc{|first,last| s.set first,last}
55
s.command(proc{|*args| states_lbox.yview(*args)})
56
s.pack('side'=>'right', 'fill'=>'y')
57
states_lbox.pack('side'=>'left', 'expand'=>1, 'fill'=>'both')
58
}.pack('side'=>'top', 'expand'=>'yes', 'fill'=>'y')
61
'����','�Ŀ�','����','����','���','���','��ɲ',
62
'��ʬ','���','����','����','����','������','������',
63
'����','����','����','����','����','���','����',
64
'����','�Ų�','�纬','����','���','����','����',
65
'Ļ��','�ٻ�','Ĺ��','Ĺ��','����','����','ʼ��',
66
'����','ʡ��','ʡ��','ʡ��','�̳�ƻ','����','�ܾ�',
67
'�ܺ�','����','����','����','�²λ�'
70
states_lbox.insert(0, *ins_data)