Commit | Line | Data |
---|---|---|
86530b38 AT |
1 | package Tk::LabeledEntryLabeledRadiobutton; |
2 | require Tk::Frame; | |
3 | ||
4 | use vars qw($VERSION); | |
5 | $VERSION = '3.006'; # $Id: //depot/Tk8/demos/demos/LabEnLabRad.pm#6 $ | |
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; |