I am trying to create a Perl/Tk app that has a single main container under which multiple subwindows can be created via menus by the user. The desired behaviors are that the user should be able to move, resize, iconify, and deiconify each subwindow, but only within the bounds of the outer window. The end goal is much like many MS Windows apps where you can open a number of documents and arrange them all in the main window however you want.

It seems like I want to "embed" numerous Toplevels in either a canvas, or frame which will be under the MainWindow. I have tried that and the problem is that the window-ness of the Toplevel goes away when I used "-use" and "-container" to get that to happen. The canvas widget doesn't want me to createWindow for a toplevel either. I have searched the web and looked at tutorials. Any suggestions?


In reply to Perl Tk, Windows within Windows by stonyy

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.