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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Form to allow/disallow options in a text file

Status
Not open for further replies.

CarlosBX

Technical User
Joined
Aug 20, 2005
Messages
4
Location
MX
Hi all,

I'm trying to figure out how i can made a form that read from a text file, show line by line the text with a radio button or checkbox selected if the line starts with # and unselected if not, so other people can change the file selecting and unselecting the different lines and then save the new file results. (removing the # if the user unselect it and adding it if the user select it)

I have done some tests but all i can do till now is list the lines of the file.

I hope someone can help me, thank you in advanced.

Carlos.
 
Something like (untested):

my(@pl) = qw/-side top -anchor w/;
my $i=0;

while (<FILE>) {
$button[$i] = $dialog->Checkbutton(-text => $_,-variable => \$VARIABLE,-relief => 'flat')->pack(@pl);
$button[$i]->select if /^\#/;
$i++;
}
$dialog->Show;



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

Part and Inventory Search

Sponsor

Back
Top