Edward K. Ream wrote:
The wx.PyWindow class appears in the demo code in several places where one
would expect a wx.Panel. I have not found any documentation for this. Does
any exist? I suspect that my not understanding this class is causing
problems, but at present it's only a vague feeling. Any help would be
appreciated.
See http://wiki.wxpython.org/index.cgi/OverridingMethods
In general the wx.PyFoo classes are derived from wxFoo and are specially engineered to allow some C++ virtual methods to be overridden in Python derived classes. wx.PyWindow, wx.PyPanel, wx.PyControl, and etc. go beyond what is described in the wiki (just allowing those that need to be overridden for normal operation) and allow some methods to be overridden that normally are not needed, but that are handy to have in custom controls and certain other situations. Here is the current list:
bool DoEraseBackground(wxDC* dc);
void DoMoveWindow(int x, int y, int width, int height);
void DoSetSize(int x, int y, int width, int height,
int sizeFlags = wxSIZE_AUTO);
void DoSetClientSize(int width, int height);
void DoSetVirtualSize( int x, int y );
void DoGetSize( int *OUTPUT, int *OUTPUT ) const;
void DoGetClientSize( int *OUTPUT, int *OUTPUT ) const;
void DoGetPosition( int *OUTPUT, int *OUTPUT ) const;
wxSize DoGetVirtualSize() const;
wxSize DoGetBestSize() const;
void InitDialog();
bool TransferDataToWindow();
bool TransferDataFromWindow();
bool Validate();
bool AcceptsFocus() const;
bool AcceptsFocusFromKeyboard() const;
wxSize GetMaxSize() const;
void AddChild(wxWindow* child);
void RemoveChild(wxWindow* child);
bool ShouldInheritColours() const;
wxVisualAttributes GetDefaultAttributes();
void OnInternalIdle();
···
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!