Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

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

by graff (Chancellor)
on Jun 17, 2016 at 18:54 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1166000]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (9)
As of 2024-04-19 08:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found