I am having a hard time understanding what you are trying to do. It would be helpful if you could post some simple code to demonstrate what you have and how it fails to do what you want.

I don't know a way of forcing a MainWindow to display less than the available widgets. Is that what you are trying to do? And if so, then why?

The "title bar" for the main window is normally a constant "set it once" deal and is usually the name of your application. In any event you know what that title is because you set it!

The normal way to do what it sounds like you want is to make a new top level window with a new title for that window and probably a label for the file name that you have just opened.

The user and/or Tk re-sizes windows, not your program!

The Tk minimum main window size as you have already seen is in points, not lines of text or widgets, etc. There is not an easy way to figure out how that number of points relates to what is displayed upon the screen.

You can ask questions like is line #45 of this text widget visible on the screen or not? There are methods to pack and re-pack widgets and re-display the screen.


In reply to Re^5: Perl Tk: How Can I get the MainWindow Configuration? by Marshall
in thread Perl Tk: How Can I get the MainWindow Configuration? by ungalnanban

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.