Python – Move() function in wxPython
In this particular article we will learn, how can we move our window to a particular point. This can be achieved using Move() function in wx.Window class of wxPython.
Move() takes x and y points to move window to a particularx, y point.
Syntax :
wx.Move(self, x, y, flags=SIZE_USE_EXISTING)Parameters :
Parameter Input Type Description x int Required x position. y int Required y position. flag int flag for SetSize.
Code Example #1:
# import wxPythonimport wx # frame classclass MoveWindow(wx.Frame): def __init__(self, parent, title): super(MoveWindow, self).__init__(parent, title = title, size =(300, 200)) # move window using Move() function self.Move((500, 250)) def main(): app = wx.App() move = MoveWindow(None, title ='Move()') move.Show() app.MainLoop() if __name__ == '__main__': main() |
Output:
Code Example #2:
# import wxPythonimport wx # frame classclass MoveWindow(wx.Frame): def __init__(self, parent, title): super(MoveWindow, self).__init__(parent, title = title, size =(300, 200)) # move window to (900, 600) using Move() function self.Move((900, 600)) def main(): app = wx.App() move = MoveWindow(None, title ='Move()') move.Show() app.MainLoop() if __name__ == '__main__': main() |
Output:

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.

