#
# entry (no scrollbars) widget demo (called by 'widget')
#

# toplevel widget ¸ߤк
if defined?($entry1_demo) && $entry1_demo
  $entry1_demo.destroy 
  $entry1_demo = nil
end

# demo Ѥ toplevel widget 
$entry1_demo = TkToplevel.new {|w|
  title("Entry Demonstration (no scrollbars)")
  iconname("entry1")
  positionWindow(w)
}

# label 
msg = TkLabel.new($entry1_demo) {
  font $font
  wraplength '5i'
  justify 'left'
  text "3ΰۤʤ륨ȥ꤬ɽƤޤʸϤˤϥݥ󥿤äƹԤåƤ饿פƤɸŪMotifԽǽEmacsΥХɤȤȤˡݡȤƤޤ㤨СХåڡȥȥ-Hϥκʸǥ꡼ȥȥȥ-Dϥα¦ʸޤĹ᤮ƥɥڤʤΤϡޥΥܥ2򲡤ޤޥɥå뤳Ȥǥ뤵뤳ȤǤޤܸϤΤϥȥ-ХååǤkinput2ưƤϤ뤳ȤǤޤ"
}
msg.pack('side'=>'top')

# frame 
TkFrame.new($entry1_demo) {|frame|
  TkButton.new(frame) {
    #text 'λ'
    text 'Ĥ'
    command proc{
      tmppath = $entry1_demo
      $entry1_demo = nil
      tmppath.destroy
    }
  }.pack('side'=>'left', 'expand'=>'yes')

  TkButton.new(frame) {
    text 'ɻ'
    command proc{showCode 'entry1'}
  }.pack('side'=>'left', 'expand'=>'yes')
}.pack('side'=>'bottom', 'fill'=>'x', 'pady'=>'2m')

# entry 
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')}

# 
e1.insert(0, '')
e2.insert('end', "ΥȥˤĹʸäƤơ")
e2.insert('end', "ĹƥɥˤڤʤΤǡ")
e2.insert('end', "ºݤν꽪ޤǸˤϥ뤵ʤ")
e2.insert('end', "ʤʤǤ礦")

