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:
@@ -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()
|
||||
|
Reference in New Issue
Block a user