2003-07-31 16:52:40 -04:00
|
|
|
|
#
|
|
|
|
|
# entry (no scrollbars) widget demo (called by 'widget')
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
# toplevel widget <20><>¸<EFBFBD>ߤ<EFBFBD><DFA4><EFBFBD><EFBFBD>к<EFBFBD><D0BA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
if defined?($entry1_demo) && $entry1_demo
|
|
|
|
|
$entry1_demo.destroy
|
|
|
|
|
$entry1_demo = nil
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
# demo <20>Ѥ<EFBFBD> toplevel widget <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
$entry1_demo = TkToplevel.new {|w|
|
|
|
|
|
title("Entry Demonstration (no scrollbars)")
|
|
|
|
|
iconname("entry1")
|
|
|
|
|
positionWindow(w)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# label <20><><EFBFBD><EFBFBD>
|
|
|
|
|
msg = TkLabel.new($entry1_demo) {
|
|
|
|
|
font $font
|
|
|
|
|
wraplength '5i'
|
|
|
|
|
justify 'left'
|
|
|
|
|
text "3<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΰۤʤ륨<EFBFBD><EFBFBD><EFBFBD>ȥ꤬ɽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD><EFBFBD>ޤ<EFBFBD><EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤϥݥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>äƹԤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>å<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ƥ<EFBFBD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><DEA4><EFBFBD>"
|
|
|
|
|
}
|
|
|
|
|
msg.pack('side'=>'top')
|
|
|
|
|
|
|
|
|
|
# frame <20><><EFBFBD><EFBFBD>
|
|
|
|
|
TkFrame.new($entry1_demo) {|frame|
|
|
|
|
|
TkButton.new(frame) {
|
2004-05-01 12:09:54 -04:00
|
|
|
|
#text 'λ<><CEBB>'
|
|
|
|
|
text '<27>Ĥ<EFBFBD><C4A4><EFBFBD>'
|
2003-07-31 16:52:40 -04:00
|
|
|
|
command proc{
|
|
|
|
|
tmppath = $entry1_demo
|
|
|
|
|
$entry1_demo = nil
|
|
|
|
|
tmppath.destroy
|
|
|
|
|
}
|
|
|
|
|
}.pack('side'=>'left', 'expand'=>'yes')
|
|
|
|
|
|
|
|
|
|
TkButton.new(frame) {
|
|
|
|
|
text '<27><><EFBFBD><EFBFBD><EFBFBD>ɻ<EFBFBD><C9BB><EFBFBD>'
|
|
|
|
|
command proc{showCode 'entry1'}
|
|
|
|
|
}.pack('side'=>'left', 'expand'=>'yes')
|
|
|
|
|
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')
|
|
|
|
|
|
|
|
|
|
# entry <20><><EFBFBD><EFBFBD>
|
|
|
|
|
e1 = TkEntry.new($entry1_demo, 'relief'=>'sunken')
|
|
|
|
|
e2 = TkEntry.new($entry1_demo, 'relief'=>'sunken')
|
|
|
|
|
e3 = TkEntry.new($entry1_demo, 'relief'=>'sunken')
|
|
|
|
|
[e1,e2,e3].each{|w| w.pack('side'=>'top', 'padx'=>10, 'pady'=>5, 'fill'=>'x')}
|
|
|
|
|
|
|
|
|
|
# <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
e1.insert(0, '<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>')
|
|
|
|
|
e2.insert('end', "<EFBFBD><EFBFBD><EFBFBD>Υ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȥ<EFBFBD><EFBFBD>ˤ<EFBFBD>Ĺ<EFBFBD><EFBFBD>ʸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>äƤ<EFBFBD><EFBFBD>ơ<EFBFBD>")
|
|
|
|
|
e2.insert('end', "Ĺ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɥ<EFBFBD><EFBFBD>ˤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ڤ<EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD>Τǡ<EFBFBD>")
|
|
|
|
|
e2.insert('end', "<EFBFBD>ºݤν꽪<EFBFBD><EFBFBD><EFBFBD>ޤǸ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ˤϥ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뤵<EFBFBD><EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>")
|
|
|
|
|
e2.insert('end', "<EFBFBD>ʤ<EFBFBD><EFBFBD>ʤ<EFBFBD><EFBFBD>Ǥ<EFBFBD><EFBFBD>礦<EFBFBD><EFBFBD>")
|
|
|
|
|
|