RE:RE:Tk::Table custom keys scroll question >-----Original Message----- >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On >> Behalf Of [EMAIL PROTECTED] >> Sent: November 21, 2004 10:28 PM >> To: [EMAIL PROTECTED] >> Subject: RE:RE:Tk::Table cusom keys scrolll question >> _________ >> thanks ! >> may be you suggest >> how I can pack my widgets to >> get matrix of predefined number rows and cols ? >> thank in advance !
What are you actually trying to do? I may have given you some poor advice. Usually when someone wants to grid a bunch of Entry widgets - I start thinking "spreadsheet". If that is indeed your purpose then don't heed my previous advice. Instead use Tk::TableMatrix !! ##################### use Tk::TableMatrix; use Tk; my $var = {}; foreach my $row (0..50){ foreach my $col (0..20){ $var->{"$row,$col"} = "Row$row Col$col"; } } my $mw=tkinit; my $tm = $mw->Scrolled('TableMatrix', -scrollbars=>'se', -bg=>'white', -rows=>51, -cols=>21, -variable=>\$var)->pack(-expand=>1, -fill=>'both'); MainLoop; __END__ perldoc Tk::TableMatrix ##################### If you still wish to just use a bunch of entries for whatever your purpose - then here is a simple example of 'grid'ding some entry widgets: ##################### use Tk; use Tk::Pane; use strict; my @entry; my $mw=tkinit; my $pane = $mw->Scrolled('Pane')->pack(-expand=>1, -fill=>'both'); foreach my $row (0..50) { foreach my $col (0..20) { $entry[$row][$col] = $pane->Entry( -text=>"Row $row Col $col") ->grid(-row=>$row, -column=>$col); } } MainLoop; __END__ perldoc Tk::grid ##################### There are other table-like widgets but TableMatrix is the most powerful and most efficient. It all depends on your purpose. Jack <<<<<<<<<<<< thank you ! My purpose is : I am looking for a possibility of migrating of some my old vb database applications to perl. 1)In vb there is Visual Data Manager (visdata app) Is there some analog of it in perl ? 2)I would like example of analog of databound DataGrid control /in perl/ for browsing tables 3)And I have some Clipper5 apps which extensively use custom browsing : <Down> key in last row appends a new row with some cells having values predicted from few above cells. How To achieve this in perl Tk? _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs