home *** CD-ROM | disk | FTP | other *** search
/ Netrunner 2004 October / NETRUNNER0410.ISO / regular / ActivePerl-5.8.4.810-MSWin32-x86.msi / _c5524d73789766e591dce4cb48d71dff < prev    next >
Text File  |  2004-06-01  |  2KB  |  42 lines

  1. package Tk::LabeledEntryLabeledRadiobutton;
  2. require Tk::Frame;
  3.  
  4. use vars qw($VERSION);
  5. $VERSION = '4.004'; # $Id: //depot/Tkutf8/demos/demos/LabEnLabRad.pm#4 $
  6.  
  7. use base  qw(Tk::Frame);
  8.  
  9. require Tk::LabEntry;
  10. require Tk::LabRadio;
  11.  
  12. Construct Tk::Widget 'LabeledEntryLabeledRadiobutton';
  13.  
  14. sub Populate
  15. {
  16.  
  17.     # LabeledEntryLabeledRadiobutton(s) constructor.
  18.     #
  19.     # Advertised subwidgets:  labeled_entry, labeled_radiobutton.
  20.  
  21.     my($cw, $args) = @_;
  22.  
  23.     my $e = $cw->Component(LabEntry => 'labeled_entry');
  24.     $e->pack(-side => 'left', -expand => 1, -fill => 'both');
  25.  
  26.     my $r = $cw->Component(LabRadiobutton => 'labeled_radiobutton',
  27.                            -radiobuttons   => delete $args->{'-radiobuttons'}
  28.                           );
  29.     $r->pack(-side => 'left', -expand => 1, -fill => 'both');
  30.     $cw->ConfigSpecs(-entry_label    => [ Tk::Configure->new($e,'-label'), undef, undef, 'Entry' ],
  31.                      -radio_label    => [ Tk::Configure->new($r,'-label'), undef, undef, Choose ],
  32.                      -entry_variable => [ Tk::Configure->new($e,'-textvariable'), undef, undef, \$cw->{Config}{-text} ],
  33.                      -radio_variable => [ Tk::Configure->new($r,'-variable'), undef, undef, undef ],
  34.                      -indicatoron    => [ 'labeled_radiobutton' , undef, undef, undef ],
  35.                      DEFAULT         => [ ['labeled_entry','labeled_radiobutton']],
  36.                     );
  37.     $cw->Delegates(DEFAULT => 'labeled_entry');
  38.  
  39. } # end LabeledEntryLabeledRadiobutton(s) constructor
  40.  
  41. 1;
  42.