I'm very new to Perl TK (read my first info this morning, so be easy correcting my possible slip ups in terminology...)
I'm assisting a co-worker in editing an existing Perl TK application we use for debug. Currently it is a window, with a single frame, and a canvas in that frame.
We would like to split the window so that we have the same content in an upper and lower view of the same data we had in the canvas already, but with independant scroll bars.
We find that using this tool it would be helpful to have the header information that is printed at the top most of the time, but fairly often it would be nice to pull down the top canvas so we can compare things going on above and below (like splitting an editor screen in half and seeing 2 parts of the same file...at least in concept)
We think we can solve this by duplicating the entirety of the canvas objects, but that seems heavy handed and sometimes the data that goes into generating these is fairly complex and time consuming.
I wanted to believe that there was an easier way to do this than duplication, but my searches (for the last few hours) has come up empty.
$top->title("Diagram Viewer");
$top->configure(-background => 'white');
#<a menu bar at the top>...skipping some details
my $menu_bar = $top->Frame()->pack(-side => 'top', -fill => 'x');
#skipping adding buttons to menu_bar....
# the next frames
my $top_canvas_frame = $top->Frame()->packAdjust(-side => 'top', -expa
+nd => 'both', -fill => 'both');
my $bottom_canvas_frame = $top->Frame()->pack(-side => 'bottom', -expa
+nd => 'both', -fill => 'both');
my $blankCanvas = { canvas => newCanvas($top_canvas_frame)};
# here is where I can't figure out a way to insert another view $blank
+Canvas into $bottom_canvas_frame so we can get dual views...
<readmore>
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.