List Info

Thread: Re: Can't override OnCreateStatusBar for wxFrame




Re: Can't override OnCreateStatusBar for wxFrame
country flaguser name
United States
2007-10-22 09:24:55
Colin McPhail wrote:
> Larry Bates <larry.bates <at> websafe.com>
writes:
> 
>> I wanted to create a custom status for my frame but
I couldn't 
>> get it to work. 
>> I've stripped it down to the code below.  Docs say
if you override 
>> OnCreateStatusBar method of wx.Frame it will get
called and you 
>> can return your custom status bar instance.  Am I
doing something 
>> wrong, or is this a bug?
>>
> I might be wrong, but I believe that the technology
that wraps 
> wxwidgets into wxpython doesn't cope with C++ virtual
functions 
> (like OnCreateStatusBar).
> 
> Instead, in your frame's __init__ you could create an
instance of your
> custom status bar and then use the frame's
SetStatusBar() method to
> do the needful.
> 
>> Thanks in advance.
>> Larry
>>
> Regards,
> -- Colin

That was my "workaround" that I found after
Googling for quite some time to find 
an answer.  T think it is "odd" that virtual
methods like OnGetChildrenCount of 
and OnGetItemCount (virtual TreeCtrl mixin) work just fine
but this one doesn't.

-Larry


------------------------------------------------------------
---------
To unsubscribe, e-mail: wxPython-users-unsubscribelists.wxwidgets.org
For additional commands, e-mail: wxPython-users-helplists.wxwidgets.org


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )