Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: how to change Tk::Tree data value

by Sandy (Curate)
on Jun 15, 2011 at 14:33 UTC ( #909791=note: print w/ replies, xml ) Need Help??


in reply to how to change Tk::Tree data value

If you set your data to an anonymous hash, you can adjust it as required.
$tree->add('1.1',-text=>'aaa',-data=>{-info=>'aaa'});
then
# get data my $d=$tree->infoData('1.1'); # change data $d->{-info}='new data';
Next time you get the infoData, it will have your new information.

UPDATE!

or you can use entryconfigure

# set entry $tree->add('1.1',-text=>'aaa',-data=>'aaa'); # change data for entry $tree->entryconfigure('1.1',-data=>'new data');

Comment on Re: how to change Tk::Tree data value
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (4)
As of 2016-04-30 08:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    :nehw tseb si esrever ni gnitirW







    Results (441 votes). Check out past polls.