Hi, im making a tree in perl.
Ive made the following code except for one thing, i cant copy and paste what gets displayed in the tree.
How do i do that?
The code is the following:
Code:
#!/usr/bin/perl
use Tk;
use Tk::Tree;
use Tk::ItemStyle;
$hemmi = "333";
my $mw = MainWindow->new(-title => 'Tree', -width => 750, -height=>500);
my $tree = $mw->Tree(-font => 'Courier 14', -foreground => 'blue')->place(-x => 0, -y => 0, -width => 10000, -height => 1000);
$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", -text => "Miscellaneous");
$tree->autosetmode();
$tree->close("1");
MainLoop;
Last edited by Nico; 11-14-06 at 07:21 PM.
Reason: Please use [code] wrappers when posting code.