in reply to retriving info from a csv file in Tk

And once you use lwicks method to extract your csv to an array, just use the following sample code, to load them into a Tk::Pane. I just use 1..13, but you will want to cycle thru your array.
#!/usr/bin/perl use warnings; use strict; use Tk; use Tk::Pane; my $mw =MainWindow-> new (-title => "Demo"); $mw->geometry('340x300'); my $frame_tl= $mw->Scrolled('Pane', -scrollbars => 'se', )->pack(-expand => 1, -fill => 'both'); my %f; for (1..13){ $f{$_}{'frame'}= $frame_tl->Frame(-borderwidth =>2, -relief=> 'groo +ve') ->pack(-side => 'top', -fill => 'x'); $f{$_}{'label'} = $f{$_}{'frame'}->Label(-relief => 'groove',-text= +>" $_ :" ) ->pack(-side => 'left', -fill => 'y'); $f{$_}{'entry'}= $f{$_}{'frame'}->Entry(-takefocus => 1,-width => 6 +0, -textvariable=>\$_) ->pack(-side => 'left', -fill => 'y'); } MainLoop;

I'm not really a human, but I play one on earth. Cogito ergo sum a bum

Replies are listed 'Best First'.
Re^2: retriving info from a csv file in Tk
by kranthi (Sexton) on May 22, 2008 at 10:51 UTC
    Hi lwicks and zentara, Thank you for answering my query. Can you please explain me how to delete the record frm the pane. Say i want to delete the record of employee whose EMP_Name = 'ABC'. I am not getting the reference to that particular widget. Pls let me know how to do the same.