Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

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

What do you get from $mw->winfo('geometry') ?
With the code as posted replacing $mw->geometry with no parameters with $mw->winfo('geometry') and requesting $mw->geometry('+10+0') I got:
init geometry=497x32+10+57,rootx=10,rooty=57;height:32.00
exit geometry=497x32+10+57,rootx=10,rooty=57;height:32.00
I have no doubt the nudge(+57) it got relates to the Ubuntu task bar at top of screen.
I changed the requested geometry to '+100+150' to ensure well away from the edges/bars and got:
init geometry=497x32+100+180,rootx=100,rooty=180;height:32.00
exit geometry=497x32+100+180,rootx=100,rooty=180;height:32.00
In this case the nudge is '+30'.
The problem of course being/remaining is saving the window coordinates as returned via either $mw->geometry or $mw->winfo('geometry') and attempting to reuse them at start of the next app run means the window will basically be offset and this would be cumulative unless some adjustment made on my part - but that adjustment is unlikely to be one size fits all.
Again thanks for your time and efforts. I however, believe the return on effort for providing that ability in my case is not worth it and the user will just have to move the window themselves each session - FYI undecorated windows, while not having this problem, have another which is if the user moves the window to cover the system task bar (which they cannot do with a decorated one), they cannot move it back if there is nothing to 'grab' i.e. the window fits within the task bar (so I don't let that happen).


In reply to Re^4: Tk geometry unexpected return if window withdrawn and re-instated by WayneRas
in thread Tk geometry unexpected return if window withdrawn and re-instated by WayneRas

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 chanting in the Monastery: (3)
As of 2024-04-20 02:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found