Ok,..Please bear with me - maybe I ma not making myself clear..

For a start your code doesn't represent the data in Dirtree like display. Your code displays the data , although its in hierarchal manner, buts its more like a table.

Lets forget I have a C drive and instead lets assume I have a drive called 'London', inside this drive I created folders that I called IT, HR, Legal, IBD,...etc. Iside each of these folders I created my Groups and then my function units. Then I programmed a Tk::DirTree to point to this drive. So in my Tk window I should see a top level folder called 'London' this folder will show as an opened folder icon. Under it I should see 4 folders with a plus sign on them to indicate that there are other folder inside them. exactly like this code;
use strict; use Tk 800.005; use Tk::TList; use Tk::DirTree; use Tk::Frame; use Tk::Scrollbar; use Tk::Adjuster; use vars qw/%tk %dr %im @users @groups $dnd_token/; $tk{mw} = MainWindow->new(-background => 'white'); $tk{mw}->geometry('500x400'); $tk{left_frame} = $tk{mw}->Frame; $tk{adjuster} = $tk{mw}->Adjuster(-widget=> $tk{left_frame}, -side= +>'left'); $tk{right_frame} = $tk{mw}->Frame; $tk{dir_tree} = $tk{left_frame}->Scrolled('DirTree', -height=>'0', -width=>'0', -scrollbars=>'e', ); $tk{output_list} = $tk{right_frame}->Scrolled('TList', -height=>'1', -width=>'1', -scrollbars=>'osoe',); $tk{user_list} = $tk{right_frame}->Scrolled('TList', -height=>'1', -width=>'1', -scrollbars=>'osoe',); $tk{group_list} = $tk{right_frame}->Scrolled('TList', -height=>'1', -width=>'1', -scrollbars=>'osoe',); $tk{user_label} = $tk{right_frame}->Label(-text => "Source Machines" +); $tk{group_label} = $tk{right_frame}->Label(-text => "Applications"); $tk{output_label} = $tk{right_frame}->Label(-text => "WinBcp Hosts"); $tk{dir_tree}-> delete('all'); $tk{dir_tree}-> chdir ("c:\\"); $tk{left_frame}->pack(qw/-side left -fill y/); $tk{adjuster}->pack(qw/-side left -fill y/); $tk{right_frame}->pack(qw/-side right -fill both -expand 1/); $tk{dir_tree} ->pack(qw/-side left -fill both -expand 1/); $tk{output_label}->pack(qw/-side top -fill both/); $tk{output_list} ->pack(qw/-side top -fill both -expand 1/); $tk{user_label} ->pack(qw/-side top -fill both/); $tk{user_list} ->pack(qw/-side top -fill both -expand 1/); $tk{group_label} ->pack(qw/-side top -fill both/); $tk{group_list} ->pack(qw/-side top -fill both -expand 1/); MainLoop; exit 0;
As you can see from the left frame, the layout of the data (represented in a folder form) is what I am trying to achieve here. So instead of the folders on my C drive I need to display the Departemental data in the same manner.

Thanking You

Blackadder

In reply to Re^4: Displaying a list of hashes in TK in a Hierarchical folder presentation by blackadder
in thread Displaying a list of hashes in TK in a Hierarchical folder presentation by blackadder

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.