WXPython Maximize Frame Disable Resizing

Hello All,

I am using Python 2.7.6 and wxPython 2.8.12.1 on Linux Mint 17.1 KDE Desktop 4.14.2. I am trying to develop an application in which the window will start maximized and there will be no maximize box or resize box. In other words users will not be able to resize the window. Here is my code.

import wx

class Frame1(wx.Frame):
def init(self, *args, **kwds):
kwds[“style”] = (wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE) & ~ (wx.RESIZE_BORDER|wx.RESIZE_BOX|wx.MAXIMIZE_BOX)
wx.Frame.init(self, *args, **kwds)
self.Layout()
self.Show()

if name == “main”:
a = wx.App(0)
f = Frame1(None, -1, “No Resize”)
a.MainLoop()

``

On KDE desktop, I do not get the maximized window. What is it I am missing here?

Please help.
Thanks.

See my answer on stackoverflow.
Werner

···

On 4/11/2015 8:44, JC wrote:

Hello All,

    I am using Python 2.7.6 and wxPython 2.8.12.1 on Linux Mint 17.1

KDE Desktop 4.14.2. I am trying to develop an application in
which the window will start maximized and there will be no
maximize box or resize box. In other words users will not be
able to resize the window. Here is my code.

import wx

          class Frame1(wx.Frame):

                def __init__(self, *args, **kwds):

                    kwds["style"] = (wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE) & ~ (wx.RESIZE_BORDER|wx.RESIZE_BOX|wx.MAXIMIZE_BOX)

                    wx.Frame.__init__(self, *args, **kwds)

                    self.Layout()

                    self.Show()



          if __name__ == "__main__":

                a = wx.App(0)

                f = Frame1(None, -1,                 "No

Resize")

                a.MainLoop()

``

    On KDE desktop, I do not get the maximized window. What is it I

am missing here?

http://stackoverflow.com/questions/29566390/wxpython-maximize-frame-disable-resizing/29575444#29575444

Same thing. No change. Is it KDE related?

Thanks.

···

On Saturday, April 11, 2015 at 1:20:03 PM UTC+5:30, werner wrote:

On 4/11/2015 8:44, JC wrote:

Hello All,

    I am using Python 2.7.6 and wxPython 2.8.12.1 on Linux Mint 17.1

KDE Desktop 4.14.2. I am trying to develop an application in
which the window will start maximized and there will be no
maximize box or resize box. In other words users will not be
able to resize the window. Here is my code.

import wx

          class Frame1(wx.Frame):

                def __init__(self, *args, **kwds):

                    kwds["style"] = (wx.DEFAULT_FRAME_STYLE|wx.MAXIMIZE) & ~ (wx.RESIZE_BORDER|wx.RESIZE_BOX|wx.MAXIMIZE_BOX)

                    wx.Frame.__init__(self, *args, **kwds)

                    self.Layout()

                    self.Show()



          if __name__ == "__main__":

                a = wx.App(0)

                f = Frame1(None, -1,                 "No

Resize")

                a.MainLoop()

``

    On KDE desktop, I do not get the maximized window. What is it I

am missing here?

See my answer on stackoverflow.

http://stackoverflow.com/questions/29566390/wxpython-maximize-frame-disable-resizing/29575444#29575444

Werner

Could be, I think I am on Cinnamon.

Werner

···

On 4/11/2015 11:06, JC wrote:

Same thing. No change. Is it KDE related?

Can you try as a work around to add:

self.Maximize()

Werner

···

On 4/11/2015 11:06, JC wrote:

Same thing. No change. Is it KDE related?

Same thing. No change.

Thanks.

···

On Saturday, April 11, 2015 at 3:53:28 PM UTC+5:30, werner wrote:

On 4/11/2015 11:06, JC wrote:

Same thing. No change. Is it KDE related?

Can you try as a work around to add:

self.Maximize()

Werner

Using self.ShowFullScreen()

···

2015-04-11 9:48 GMT-03:00 JC chalao.adda@gmail.com:

Same thing. No change.

Thanks.

On Saturday, April 11, 2015 at 3:53:28 PM UTC+5:30, werner wrote:

On 4/11/2015 11:06, JC wrote:

Same thing. No change. Is it KDE related?

Can you try as a work around to add:

self.Maximize()

Werner

You received this message because you are subscribed to the Google Groups “wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an email to wxpython-users+unsubscribe@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Marian
"La función de un buen software es hacer que lo complejo aparente ser simple " Grady Booch