Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8294431
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T14:12:51+00:00 2026-06-08T14:12:51+00:00

I want to save window position and size when user is closing main window

  • 0

I want to save window position and size when user is closing main window of my application, but i cant get correct window position

myTopLevelWindow.connect('unrealize', self.__onUnrealize)

def __onUnrealize(self, widget):
    myTopLevelWindow.get_size() #OK
    myTopLevelWindow.get_position()    <-- always (0, 0) :P

in what signal handler get_position() will work correctly? I’ve tried ‘destroy’ and it’s also not good :/

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T14:12:52+00:00Added an answer on June 8, 2026 at 2:12 pm

    Have you tried “delete-event”? I just tested it in C and gtk gives me the correct position/size in the handler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've got a legacy WinForms app and I want to save the window position
I'm trying to save / restore the window size, state and position of a
I want save the username and password when user login, and I added the
I want to save and load my xml data using XmlReader. But I don't
i want to save a balance of user, in the user table . the
I want to echo the following code: <a href=http://delicious.com/save onclick=window.open('http://delicious.com/save?v=5&noui&jump=close&url='+encodeURIComponent(location.href)+'&title='+encodeURIComponent(document.title), 'delicious','toolbar=no,width=550,height=550'); return false; class=delicious
In my application I use a SaveFileDialog to pop up a Save As window.
Many posts around about restoring a WinForm position and size. Examples: www.stackoverflow.com/questions/92540/save-and-restore-form-position-and-size www.codeproject.com/KB/dialog/restoreposition.aspx?fid=1249382&df=90&mpp=25&noise=3&sort=Position&view=Quick&select=2595746 But
I want to save bounds of my window in registry, for that I use
I using tableAdapterManager for updating my data. But when i want save with this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.