Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (3)
As of 2024-04-26 03:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found