Well, at first glance it appears as though the answer to your question is "no".

I don't believe that Tk provides any information about a "panel" on any given OS/Window Manager/GUI. Actually just looking at that last sentence it's quite obvious why not. Plainly put, there are simply too many different options. From the Gnome Panel to the KDE panel, to WM's docking bar, or FVWM95's "start bar", even MS-Windows has different "shells" that don't use a Start bar.

There are some other options though - perhaps using takefocus/always focus within Tk will help ( I believe these are valid methods in Tk for toplevel objects). Though this will put it simply on top of the menu, and whether that will work for all of them I don't know (does the MS-Windows start menu relinquish it's always on top to other always on top apps? Is this implemented properly in Win32 port of Tk?).

Perhaps the other option is some dirty hacks to find out position and size of current "panels". The gnome panel stores it's size info in ~/.gnome/panel.d/panel, Win32 probably has some info in the registry as to location and size of Start menu, I'm sure that KDE has some info regarding it's panel as well. The problem comes down to where and whom is going to be using the app. Good luck, oh and BTW if you ever find out where exactly in the registry Start menu info stays, please let me know ;-)

In reply to Re: Sizing Tk Widgets WRT the Taskbar by the_slycer
in thread Sizing Tk Widgets WRT the Taskbar by nokesja

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.