Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^3: failed AUTOLOAD widgets when trying to destory widget

by zentara (Archbishop)
on Oct 26, 2012 at 14:37 UTC ( #1001093=note: print w/replies, xml ) Need Help??


in reply to Re^2: failed AUTOLOAD widgets when trying to destory widget
in thread failed AUTOLOAD widgets when trying to destory widget

As far as I know, you can't mix pack and grid. First you pack() your widgets, then you try to use grid() on them, you can't. See Geometry Management

Here is a simple grid usage:

#!/usr/bin/perl use warnings; use strict; use Tk; use Data::Dumper; my $top = new MainWindow(); #my %items = ( A => [1,1a], B => [2,2a], C => [3,3a] ); my $count = 0; my %items = (); for('A'..'Z','a'..'z'){ $count++; $items{$_} = [$count, "$count-a"]; } my $row = 0; foreach my $item ( sort keys(%items) ) { #print @{$items{$item}},"\n"; $top->Label( -text => $item, -anchor => "w", -relief => 'solid', #will show gridlines )->grid( -row => $row, -column => 0 ); $top->Entry( -textvariable => \$items{$item}[0], -width => 5, -relief => 'solid', #will show gridlines )->grid( -row => $row, -column => 1 ); $top->Entry( -textvariable => \$items{$item}[1], -width => 5, -relief => 'solid', #will show gridlines )->grid( -row => $row, -column => 2 ); $row++; } MainLoop();

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

Replies are listed 'Best First'.
Re^4: failed AUTOLOAD widgets when trying to destory widget
by reaper9187 (Scribe) on Oct 26, 2012 at 15:20 UTC
    i realized my mistake later and tried it without packing it ..
    It works Now ..!!! THank you so much ..!!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001093]
help
Chatterbox?
Corion is mildly surprised as some different toy projects coagulate into a useful application. I've been toying with writing a Meetup wrapper and also have been toying with synchronizing events between (CalDAV) calendars, and now that means I can ...
[Corion]: ... easily* synchronize my personal calendar with Meetup and import stuff from Meetup there
[Corion]: * Code not yet written, some restrictions may apply

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-02-23 09:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (343 votes). Check out past polls.