Corrected some things in, and some thing revealed by

the Life! sample.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5197 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2000-01-03 13:45:20 +00:00
parent 6809ee4b8e
commit b919f007af
4 changed files with 107 additions and 106 deletions

View File

@@ -236,8 +236,8 @@ enum
ID_CLEAR, ID_CLEAR,
ID_START, ID_START,
ID_STOP, ID_STOP,
ID_ABOUT,
ID_EXIT, ID_EXIT,
ID_ABOUT,
// slider // slider
ID_SLIDER ID_SLIDER
@@ -351,7 +351,7 @@ LifeFrame::LifeFrame() : wxFrame((wxFrame *)0, -1, _("Life!"), wxPoint(50, 50))
// slider // slider
wxSlider *slider = new wxSlider(panel, ID_SLIDER, 5, 1, 10, wxSlider *slider = new wxSlider(panel, ID_SLIDER, 5, 1, 10,
wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL | wxSL_AUTOTICKS); wxDefaultPosition, wxSize(150,-1), wxSL_HORIZONTAL | wxSL_AUTOTICKS);
// component layout // component layout
wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL); wxBoxSizer *sizer = new wxBoxSizer(wxVERTICAL);
@@ -455,6 +455,7 @@ void LifeFrame::OnNewGame()
m_canvas->Reset(); m_canvas->Reset();
m_tics = 0; m_tics = 0;
UpdateInfoText(); UpdateInfoText();
m_canvas->Refresh();
} }
else else
{ {

View File

@@ -206,7 +206,7 @@ void wxSizerItem::SetDimension( wxPoint pos, wxSize size )
m_sizer->SetDimension( pos.x, pos.y, size.x, size.y ); m_sizer->SetDimension( pos.x, pos.y, size.x, size.y );
if (IsWindow()) if (IsWindow())
m_window->SetSize( pos.x, pos.y, size.x, size.y ); m_window->SetSize( pos.x, pos.y, size.x, size.y, wxSIZE_ALLOW_MINUS_ONE );
m_size = size; m_size = size;
} }