#1
  1. Contributing User
    Devshed Intermediate (1500 - 1999 posts)

    Join Date
    Dec 2004
    Location
    Meriden, Connecticut
    Posts
    1,797
    Rep Power
    154

    [wxPython] Cover screen with Window


    Is there a way for wxPython to cover the enter screen with the window of your program?
  2. #2
  3. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    12
    I also need to know this. I am not up to that in my app yet. But there is a SplashScreen object and I think a 'display' object that has the screen's dimensions which you can use with size=wx.Size().

    Look here:
    http://wiki.wxwidgets.org/docs.html search for 'Display'

    I came up with this:
    Code:
    		geometry = wx.Display().GetGeometry() 
    		w = geometry[2] 
    		h = geometry[3] 
    		wx.Frame.__init__(self, None, -1, "Front End", style=wx.STAY_ON_TOP, pos=wx.Point(0, 0), size=wx.Size(w, h))
    Last edited by movEAX_444; June 30th, 2005 at 12:54 AM.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    Hi!

    Doesn't Maximize() do what you want?
    Code:
    import wx
    
    class TestFrame(wx.Frame):
        def __init__(self, parent, ID, title):
            wx.Frame.__init__(self, parent, ID, title, style=wx.DEFAULT_FRAME_STYLE)
            self.Maximize()
    
    
    app = wx.PySimpleApp(0)
    mainframe=TestFrame(None, -1, "Title")
    app.SetTopWindow(mainframe)
    mainframe.Show()
    app.MainLoop()
    Regards, mawe
  6. #4
  7. Cast down
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2003
    Location
    Sweden
    Posts
    321
    Rep Power
    12
    Thanks. style=wx.STAY_ON_TOP and the Maximize() method achieved exactly what I want. On Windows at least. Hopefully the same works on Linux.
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2004
    Posts
    394
    Rep Power
    52
    It should. I tested it on Linux (Ubuntu) and it works

IMN logo majestic logo threadwatch logo seochat tools logo