|Syntactic Confectionery Delight|
I want Tk::Splashscreen not centered.by ric00015 (Beadle)
|on Oct 23, 2013 at 23:12 UTC||Need Help??|
ric00015 has asked for the
wisdom of the Perl Monks concerning the following question:
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.