Tham khảo tài liệu 'web client programming with perl-chapter 7: graphical examples with perl/tk- p3', công nghệ thông tin, quản trị web phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Chapter 7 Graphical Examples with Perl Tk- P3 Our destinations list is an almost exact copy of the list you d see on the web page. For ease in using we placed . as the first item in the list and we will select it as our default choice when we build the listbox my entry_f mw- Frame entry_f- pack -expand n -fill x entry_f- Label -text Airbill - pack -side left -anchor w -expand n -fill none my airbill my airbill_entry entry_f- Entry -textvariable airbill -width 10 airbill_entry- pack -side left -anchor w -expand y -fill x The entry for the airbill requires a label so that the user knows what sort of input is expected. The default for the airbill variable is blank. We save a reference to the entry widget so that we can set the focus of the application to it right before we enter the MainLoop entry_f- Label -text Date Shipped - pack -side left -anchor w -expand n -fill none my months my i 1 foreach qw Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec months _ i my fulltime localtime my month day year fulltime w s w s d s. . . s. d d month months month month 0 month if length month 2 day 0 day if length day 2 my date month day year entry_f- Entry -textvariable date -width 6 - pack -side left -anchor w -expand n -fill none