in reply to set multiple entry boxes and text output boxes in perl TK at run time

Can the GUI be dynamically changed in this manner?

The answer is yes, it can be done like that. Its no different to do it from a slider than to do it without a slider.

I have also updated my code now, so that it is more clear. This is what I am trying to accomplish. Am I in the right direction?

It was always clear what you wanted to accomplish, and

Yes, you're in the right direction in the sense that you're trying and stuff is happening, and

Yes, you have some confusion so

Yes, you have to start from the beginning, and I'll help you along all the way until you're finished, if you're willing to do your part and write this program with me

Here, I'll start, your assignment is take this program(hot01.pl) and copy into hot02.pl and modify/complete how I ask, and post as a reply; it should run without warnings

1) give "MakeStuff" and "MakeOne" names that mean something to you, your problem, your program, and

2) Also improve MakeOne to where it packs stuff you're interested in, it should be easy

Here it is hot01.pl

#!/usr/bin/perl -- use strict; use warnings; use Tk qw' tkinit '; Main( @ARGV ); exit( 0 ); sub Main { my $mw = tkinit; MakeStuff( $mw, 3 ); $mw->MainLoop; } sub MakeStuff { my( $w, $howmany ) = @_; for my $n ( 1 .. $howmany ){ MakeOne( $w, $n ); } } sub MakeOne { my( $w, $text )= @_; $w->Button( -text => $text )->pack; }
  • Comment on Re: set multiple entry boxes and text output boxes in perl TK at run time (yes)
  • Download Code