2
#########################################################
4
# set $KCODE to 'utf' for a utf8 charecter
6
#########################################################
10
require 'tkextlib/iwidgets'
12
TkOption.add('*textBackground', 'white')
14
ef = Tk::Iwidgets::Entryfield.new(:command=>proc{puts "Return Pressed"})
16
fef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Fixed:',
17
:fixed=>10, :width=>12)
19
nef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Numeric:',
20
:validate=>:numeric, :width=>12)
22
aef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Alphabetic:',
23
:validate=>:alphabetic, :width=>12,
25
puts "Alphabetic contents invalid"
28
pef = Tk::Iwidgets::Entryfield.new(:labeltext=>'Password:', :width=>12,
29
:show=>"\267", ## <=== utf8 character
30
:command=>proc{puts "Return Pressed"})
32
Tk::Iwidgets::Labeledwidget.alignlabels(ef, fef, nef, aef, pef)
34
ef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
35
fef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
36
nef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
37
aef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)
38
pef.pack(:fil=>:x, :expand=>true, :padx=>10, :pady=>5)