Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re^4: Tk multiple monitor problem

by JohnRS (Scribe)
on Mar 11, 2012 at 02:47 UTC ( [id://958909]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Tk multiple monitor problem
in thread Tk multiple monitor problem

I did look at DialogBox.pm and a few others. This is why I feld that probably the Show routine was at fault. I did not know where to find Popup till your message, however. In Wm.pm I now see it. Indeed, this part of it would appear to cause the problem.

# adjust to not cross screen borders if ($X < 0) { $X = 0 }

Unfortunately, when I change this line my code runs the same. So I'm mystified.

Also in Wm.pm I noted the Post routine. It contains this.

$w->geometry("+$X+$Y"); # $w->MoveToplevelWindow($X,$Y);

I'm guessing that the commented out MoveToplevelWindow call was replaced by the one to geometry (which works OK on multiple monitors).

Thanks for the leads, however. :)

Replies are listed 'Best First'.
Re^5: Tk multiple monitor problem
by Argel (Prior) on Mar 12, 2012 at 19:12 UTC
    Just curious -- I take it the 'withdraw' does not work?

    Elda Taluta; Sarks Sark; Ark Arks
    My deviantART gallery

      I'm not sure what 'withdraw' you are talking about.

        In Re^3: Tk multiple monitor problem about a third of the way down the code is a $mw->withdraw. It's used to hide what you are working on until you are ready to display it. Something like:
        $mw->withdraw # Do all your GUI creation stuff here $mw->deiconify; # Not sure if this is needed (maybe only with X) $mw->raise;
        I had assumed you had tried that, but now it sounds like maybe not. Or maybe it's mroe of an X-Windows thing.

        Elda Taluta; Sarks Sark; Ark Arks
        My deviantART gallery

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://958909]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-18 02:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found