Use member variable instead of a global in the dialogs sample.

Made MyCanvas member of MyFrame instead of using a global variable which was
put inside the frame by wxApp.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62263 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2009-10-05 22:53:32 +00:00
parent e9ee227022
commit 87a1867991
2 changed files with 21 additions and 18 deletions

View File

@@ -422,15 +422,21 @@ private:
wxColourData m_clrData;
// just a window which we use to show the effect of font/colours selection
wxWindow *m_canvas;
DECLARE_EVENT_TABLE()
};
class MyCanvas: public wxScrolledWindow
{
public:
MyCanvas(wxWindow *parent) :
wxScrolledWindow(parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxNO_FULL_REPAINT_ON_RESIZE) { }
MyCanvas(wxWindow *parent) : wxScrolledWindow(parent, wxID_ANY)
{
SetBackgroundColour(*wxWHITE);
}
private:
void OnPaint(wxPaintEvent& event);
DECLARE_EVENT_TABLE()