Python Forum
pygame get window position
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pygame get window position
#1
Hi!
This seems like an obviously asked and answered and if so, I apologize. However, I cannot seem to be able to find the answer, and I have lost a few days searching.
So, I am trying to get current position of pygame window on physical screen in order to set other forms positions accordingly.
It would also bi nice to be able to set position and detect movement of window, but it’s not critical for my project. Not at this point anyway.
All I found was:
import os
os.environ['SDL_VIDEO_WINDOW_POS']='%d,%d' %(x,y)
Please help!
Reply


Messages In This Thread
pygame get window position - by vskarica - Oct-11-2020, 09:10 PM
RE: pygame get window position - by metulburr - Oct-11-2020, 11:48 PM
RE: pygame get window position - by vskarica - Oct-12-2020, 07:04 AM
RE: pygame get window position - by nilamo - Oct-18-2020, 05:14 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  [PyGame] Cannot display anything inside pygame window the_gullwing 5 1,262 Dec-07-2023, 02:44 AM
Last Post: Benixon
  [PyGame] drawing images onto pygame window djwilson0495 1 3,530 Feb-22-2021, 05:39 PM
Last Post: nilamo
  Unable to exit Pygame window Hesper 2 3,933 Mar-30-2020, 08:59 AM
Last Post: Hesper
  [pyGame] More Text in one Window, example needed ! JamieVanCadsand 1 3,584 Oct-03-2017, 03:42 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020