Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tk - radiobuttons implementation

Status
Not open for further replies.

MoshiachNow

IS-IT--Management
Feb 6, 2002
1,851
0
0
IL
HI,

In script I get all disks names stored in annamed hash $vol :
$vol = {};

I need to enable user select a disk using a radiobutton frame.
(I guess I have to define this frame prior to mainloop...)


Appreciate any ideas.
Thanks

Long live king Moshiach !
 
OK,

Ended up doing :

my $dialog3 = $mw->DialogBox (-title => 'Select target disk',-buttons => [ 'OK', 'Cancel' ],-default_button => 'OK'); #define the disk dialog
$frm3=$dialog3->add ('Frame',-foreground => 'blue')->pack(-side=>'top',-fill=>'x');
my @clr;
for (sort keys %$vol) {
$VOLUME=$_;
my $TEXT=$vol->{$VOLUME}{'TEXT'};
$clr[$count]=$frm3->Radiobutton(-variable=>\$VOLUME,-text=>"$TEXT",
-value=>"$VOLUME")->pack(-anchor=>'w');
}

MainLoop; #This function will be executed when the button is pushed


Works fine.

Long live king Moshiach !
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top