I have an application that I'd like to have a splash screen with a label, a progress bar, and possibly, a label that specifies where in execution the program is. This I have done, and am quite pleased. However, I have 2 screens; not a bad thing, but the splash screen appears in the middle of the viewing area, which happens to be right where the screen splits.

I am using Tk::Splashscreen, and as the documentation states, it can be treated like a toplevel widget. That widget has a -screen switch, but I can't figure out what to use for the value. 'Display 1', 'display 1', 'screen 1', '1', and ':1' don't work. I am assuming the displays are 1 and 2, as labeled in the Display options on Red Hat.

Does anyone know the format of the display for the -screen switch? Or does anyone know of a way to place the splash screen somewhere other than the middle of the viewing area?

Update! I just tried ':0' and it worked, but it was still in the middle of the 2 screens. Not what I wanted. <sigh> Leaving the value blank does the same thing, so maybe the -screen switch is not what I need.

Update 2! I just tried the suggestions below, but neither of them has worked. At least not yet. I will keep trying, and let you know if I get something working.

Update 3! I got it working properly by using geometry, as suggested below. I tinkered with it until I got the proper behavior. Actually it probably was the way I was creating it that was messing up. But now it's fixed.


In reply to I want Tk::Splashscreen not centered. by ric00015

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.