Re: Tkinter (and IDLE) window "docking?" effect when dragging rootwindow to edge of display

Discussion in 'Python' started by Jerry Hill, Oct 20, 2010.

  1. Jerry Hill

    Jerry Hill Guest

    On Wed, Oct 20, 2010 at 11:32 AM, <> wrote:
    > Python 2.6/2.7 (32-bit) for Windows: When I drag a Tkinter root window to
    > the left, upper, or right edge of my display ... as soon as my mouse cursor
    > hits the visible edge of the display ... as if I'm trying to dock the window
    > on the edge in question ... a giant phantom Tkinter window pops up
    > underneath my window showing the size and placement of my root window if I
    > would release my mouse button.
    >
    > You can see the identical behavior if you drag a non-maxmized IDLE window to
    > one of your screen edges (left, top, bottom). This behavior seems to be "by
    > design".
    >
    > I'm looking for a way to either disable this "docking" functionality or trap
    > the "docking" event and size and position my root window according to custom
    > needs. I've been googling this question and I can't seem to find the right
    > terms to describe the event that is being raised or the behavior that I'm
    > observing.


    It sounds like you are describing the "Aero Snap" feature in Windows
    7. If you want to turn it off system wide, you can do that in the
    control panel:

    Open the Ease of Access control panel
    Click Make it easier to focus on tasks
    Check "Prevent windows from being automatically arranged when moved to
    the edge of the screen"

    I'm afraid I don't have any Tk experience to contribute, but this
    Stack Overflow thread may be slightly helpful, even though it's
    talking about trying to do this in .NET, and there aren't really any
    conclusions reached.
    http://stackoverflow.com/questions/2470685/disable-aero-snap-wpf

    At a guess the windows message triggering the resize would be a
    WM_SIZE. You may be able to override how your application responds to
    those messages to dock the way you want to. It'll probably take some
    experimentation, though.

    --
    Jerry
     
    Jerry Hill, Oct 20, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Axial

    Xselerator window docking

    Axial, Sep 29, 2003, in forum: XML
    Replies:
    0
    Views:
    372
    Axial
    Sep 29, 2003
  2. Ferdi Smit
    Replies:
    0
    Views:
    793
    Ferdi Smit
    Oct 10, 2005
  3. Robin Dunn
    Replies:
    0
    Views:
    368
    Robin Dunn
    Jan 24, 2008
  4. denish
    Replies:
    5
    Views:
    5,768
  5. W. eWatson
    Replies:
    1
    Views:
    509
    W. eWatson
    Apr 7, 2009
Loading...

Share This Page