Syntactic Confectionery Delight | |
PerlMonks |
Re: Setting value in Tk -textvariableby Necos (Friar) |
on Aug 07, 2002 at 01:49 UTC ( [id://188212]=note: print w/replies, xml ) | Need Help?? |
Let's take Chmrr's example one step further... Here's a snippet of code that I use in one of my programs: The configure method will set the parameter (in this case, -textvariable), to a new value. You can also use the get method to retrieve the value. So, let's say you need to update a label. You could make a button that calls the sample code as a callback. In total, it would look something like this. WARNING: UNTESTED!!! The above method of using hash of hash of hashes method of Tk objects was suggested to me by NULE. It's actually a very creative method of making windows in Tk. The garbage collector apparently uses a linked list to store the parent and child windows, so you can put them anywhere and they will be properly garbage collected. I hope the example code is some help... Theodore Charles III Network Administrator Los Angeles Senior High 4650 W. Olympic Blvd. Los Angeles, CA 90019 323-937-3210 ext. 224 email->secon_kun@hotmail.com perl -e "map{print++$_}split//,Mdbnr;"
In Section
Seekers of Perl Wisdom
|
|