home *** CD-ROM | disk | FTP | other *** search
/ CD Actual Thematic 7: Programming / CDAT7.iso / Share / Editores / Perl5 / perl / lib / site / Tk / LabEntry.pm < prev    next >
Encoding:
Perl POD Document  |  1997-08-10  |  687 b   |  29 lines

  1. # Copyright (c) 1995-1997 Nick Ing-Simmons. All rights reserved.
  2. # This program is free software; you can redistribute it and/or
  3. # modify it under the same terms as Perl itself.
  4. # Class LabeledEntry
  5.  
  6. package Tk::LabEntry;
  7. require Tk::Frame;
  8. @ISA = qw(Tk::Frame);
  9.  
  10. Construct Tk::Widget 'LabEntry';
  11.  
  12. sub Populate 
  13. {
  14.  require Tk::Entry;
  15.  # LabeledEntry constructor.
  16.  #
  17.  my($cw, $args) = @_;
  18.  $cw->SUPER::Populate($args);
  19.  # Advertised subwidgets:  entry.
  20.  my $e = $cw->Entry();
  21.  $e->pack('-expand' => 1, '-fill' => 'both');
  22.  $cw->Advertise('entry' => $e );
  23.  $cw->ConfigSpecs(DEFAULT => [$e]);
  24.  $cw->Delegates(DEFAULT => $e);
  25.  $cw->AddScrollbars($e) if (exists $args->{-scrollbars});
  26.  
  27. 1;
  28.