how to get rid of the frame around a window?

I'm trying to remove the frame from a window, something like what
self.ShowFullScreen(True) would do, only without removing the other
components.

I'm not sure of the terminology, but I have a wxFrame. Here's what I
get when I execute "print self":

<__main__.MyBackground; proxy of C++ wxFrame instance at _e8eda200_p_wxFrame>

I'd like to be able to manipulate this window. For example, remove the
white frame around it, remove the close box, etc. I found this page
with the parameter wxRESIZE_BORDER and wxCLOSE_BOX that appear to do
what I need but I can't figure out how to use them:

http://www.wxwidgets.org/manuals/2.6.3/wx_wxframe.html#wxframe

Thanks for any help.

Pass them to the constructor, e.g.:

import wx
app = wx.App(False)
frame = wx.Frame(None, style=wx.DEFAULT_FRAME_STYLE&~wxCAPTION)
frame.Show()
app.MainLoop()

Cheers, Frank

···

2007/1/20, Alec Bennett wrybread@gmail.com:

I’d like to be able to manipulate this window. For example, remove the
white frame around it, remove the close box, etc. I found this page
with the parameter wxRESIZE_BORDER and wxCLOSE_BOX that appear to do

what I need but I can’t figure out how to use them:

http://www.wxwidgets.org/manuals/2.6.3/wx_wxframe.html#wxframe

Hi Alec,

Please keep this on the list, others may benefit and the conversation will be archived.

Thanks for the tip. I’m still wrapping my head around the concepts,
and am having trouble applying your code. Here’s my main loop:

if name == ‘main’:
app = model.Application(MyBackground)
app.MainLoop()

And I’m launching a child window like this:

self.viewerWindow = model.childWindow(self, collage_viewer.Minimal)

When I print self.viewerWindow (which is the window I’m trying to
affect), I get:

<collage_viewer.Minimal; proxy of C++ wxFrame instance at _58cfbc01_p_wxFrame>

Given that, do you see any way to apply properties to viewerWindow?

I’m not sure what happens in your code. Here’s what I’d do: override MyFrame.init, take out your own arguments and do with them what you need to do and pass the remaining arguments on the wx.Frame.init, like this:

class MyFrame(wx.Frame):
def init(self, myArg, *args, **kwargs):
super(MyFrame, self).init(*args, **kwargs)
# do whatever you need to do with myArg

Instantiate like this:
myFrame = MyFrame(myArg, None, style=wx.DEFAULT_FRAME_STYLE&
~wxCAPTION)

None (wx.Frame.init has one mandatory argument, the parent frame) and style are passed to wx.Frame.init by means of the args and kwargs.

You may want to (re)read http://docs.python.org/tut/node6.html#SECTION006700000000000000000

Cheers, Frank

···

2007/1/20, Alec Bennett <wrybread@gmail.com >: