How to modify the title of a wx.Frame after the constructor call?

Is there a way to change the title of a wx.Frame AFTER the constructor
call?

The wx.Frame.__init__ call lists several parameters, including the
title to be used as the frame caption. However, in checking the
methods in the documentation I see no way to subsequently modify the
title. Am I mistaken?

Thanks in advance.

Is there a way to change the title of a wx.Frame AFTER the constructor

call?

The wx.Frame.init call lists several parameters, including the

title to be used as the frame caption. However, in checking the

methods in the documentation I see no way to subsequently modify the

title. Am I mistaken?

In the sense of the documentation of wxFrame mentioning it, no. In the
sense of no such method applying to wxFrame, yes. Use .SetTitle().
That method is found in the parent class, TopLevelWindow; see here:

http://docs.wxwidgets.org/2.6/wx_wxtoplevelwindow.html#wxtoplevelwindow

A good point is if you can’t find the method but it surely must exist, check

up the class hierarchy.

Che

···

On Tue, Jul 14, 2009 at 7:59 PM, John Asnin jasnin@vtisp.com wrote:

Thanks in advance.

Another good way to find out what methods are available is to use
Python's built-in introspection tools. So for this case, I might do
this:

dir(wx.Frame)

This will print all of wx.Frame's methods (including its inherited
ones). Then you can run

help(wx.Frame.SomeMethod)

to learn more.

- Mike

···

On Jul 14, 7:55 pm, C M <cmpyt...@gmail.com> wrote:

On Tue, Jul 14, 2009 at 7:59 PM, John Asnin <jas...@vtisp.com> wrote:

> Is there a way to change the title of a wx.Frame AFTER the constructor
> call?

> The wx.Frame.__init__ call lists several parameters, including the
> title to be used as the frame caption. However, in checking the
> methods in the documentation I see no way to subsequently modify the
> title. Am I mistaken?

In the sense of the documentation of wxFrame mentioning it, no. In the
sense of no such method applying to wxFrame, yes. Use .SetTitle().
That method is found in the parent class, TopLevelWindow; see here:

wxTopLevelWindow

A good point is if you can't find the method but it surely must exist, check
up the class hierarchy.

Che

Thanks for your help - your suggestion worked perfectly.

···

On Jul 15, 7:56 am, Mike Driscoll <kyoso...@gmail.com> wrote:

On Jul 14, 7:55 pm, C M <cmpyt...@gmail.com> wrote:

> On Tue, Jul 14, 2009 at 7:59 PM, John Asnin <jas...@vtisp.com> wrote:

> > Is there a way to change the title of a wx.Frame AFTER the constructor
> > call?

> > The wx.Frame.__init__ call lists several parameters, including the
> > title to be used as the frame caption. However, in checking the
> > methods in the documentation I see no way to subsequently modify the
> > title. Am I mistaken?

> In the sense of the documentation of wxFrame mentioning it, no. In the
> sense of no such method applying to wxFrame, yes. Use .SetTitle().
> That method is found in the parent class, TopLevelWindow; see here:

>wxTopLevelWindow

> A good point is if you can't find the method but it surely must exist, check
> up the class hierarchy.

> Che

Another good way to find out what methods are available is to use
Python's built-in introspection tools. So for this case, I might do
this:

dir(wx.Frame)

This will print all of wx.Frame's methods (including its inherited
ones). Then you can run

help(wx.Frame.SomeMethod)

to learn more.

- Mike

I forgot to mention this, but I use WingWare's IDE and it does a lot
of this stuff automagically in their Source Assistant. If you're just
doing personal coding or open-source, they have some pretty cheap
licenses.

- Mike

···

On Jul 17, 4:55 am, John Asnin <jas...@vtisp.com> wrote:

Thanks for your help - your suggestion worked perfectly.

On Jul 15, 7:56 am, Mike Driscoll <kyoso...@gmail.com> wrote:

> On Jul 14, 7:55 pm, C M <cmpyt...@gmail.com> wrote:

> > On Tue, Jul 14, 2009 at 7:59 PM, John Asnin <jas...@vtisp.com> wrote:

> > > Is there a way to change the title of a wx.Frame AFTER the constructor
> > > call?

> > > The wx.Frame.__init__ call lists several parameters, including the
> > > title to be used as the frame caption. However, in checking the
> > > methods in the documentation I see no way to subsequently modify the
> > > title. Am I mistaken?

> > In the sense of the documentation of wxFrame mentioning it, no. In the
> > sense of no such method applying to wxFrame, yes. Use .SetTitle().
> > That method is found in the parent class, TopLevelWindow; see here:

> >wxTopLevelWindow

> > A good point is if you can't find the method but it surely must exist, check
> > up the class hierarchy.

> > Che

> Another good way to find out what methods are available is to use
> Python's built-in introspection tools. So for this case, I might do
> this:

> dir(wx.Frame)

> This will print all of wx.Frame's methods (including its inherited
> ones). Then you can run

> help(wx.Frame.SomeMethod)

> to learn more.

> - Mike