Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: perl TK: Dynamically changing number of inputs at run time.

by graff (Chancellor)
on Jun 17, 2016 at 18:54 UTC ( #1166000=note: print w/replies, xml ) Need Help??


in reply to perl TK: Dynamically changing number of inputs at run time.

To expand a bit on the first part of the first reply, you can define your "push_button" sub like this:
sub push_button { my $celsius = $ent -> get(); my $farienhiet = ($celsius*9/5)+32; my $msg = sprintf( "%s Celsius = %3.1f Fahrenheit\n", $celsius, $f +arienhiet ) $txt -> insert('end', $msg); }
That way, it shows both the input and output values, and doesn't erase any previous information. (But since the information is in an editable Text widget, the user can easily delete lines.)

Replies are listed 'Best First'.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1166000]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2021-03-04 22:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favorite kind of desktop background is:











    Results (108 votes). Check out past polls.

    Notices?