Google Answers Logo
View Question
 
Q: perl Tk::tree copy and paste from tree structure ( No Answer,   0 Comments )
Question  
Subject: perl Tk::tree copy and paste from tree structure
Category: Computers > Programming
Asked by: hermannjens-ga
List Price: $30.00
Posted: 17 Nov 2006 09:18 PST
Expires: 17 Dec 2006 09:18 PST
Question ID: 783579
If you run the following code in Perl then you will get a tree structure.
How do you make it possible for the user to copy and paste the text in the tree?


#!/usr/bin/perl
use Tk;
use Tk::Tree;

my $mw = MainWindow->new(-title => 'Tree', -width => 750, -height=>500);
my $tree = $mw->Tree(font => 'Courier 14', wideselection => 0,
background => white, selectbackground => grey)->place(-x => 0, -y =>
0, -width => 10000, -height => 1000);

my $text = $mw->Text(qw/-width 10 -height 10/);#->pack();
$text->insert('end', "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");

$tree->add("1", -text => "Perl Developers Guide");
$tree->add("1.1", -text => "Getting Started"); 
$tree->add("1.1.1", -text => "Before we start");
$tree->add("1.1.1.1", -text => "Why this guide");
$tree->add("1.1.1.1.1", -text => "The books usually have a lot of
extra and useless information, the reading of which wastes programmers
time.
By using my glossaries you will acquire Perl knowledge with less time
wasted than by reading the books.");
$tree->add("1.2", -text => "Variables");
$tree->add("1.3", -text => "Arrays");
$tree->add("1.4", -text => "Hashes");
$tree->add("1.5", -text => "References");
$tree->add("1.6", -text => "Loops");
$tree->add("1.7", -text => "Functions");
$tree->add("1.8", -text => "Modules");
$tree->add("1.9", -text => "Files");
$tree->add("1.10", -text => "Directories");
$tree->add("1.11", -text => "Text Manipulation");
$tree->add("1.12", -itemtype => 'imagetext', -text => "Miscellaneous");
$tree->itemCreate("1.12", 0, -text => "Hemmi");

$tree->autosetmode();
$tree->close("1.1");

MainLoop;
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy