]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/gridg.cpp
bug in wxSplitPath() corrected: the returned file name doesn't have the
[wxWidgets.git] / src / generic / gridg.cpp
index 84b4b4546f361ca115c3778449564b78787f9344..34da5b84a3fcbca84aed29c87136d838bac93be9 100644 (file)
@@ -88,7 +88,7 @@ wxGenericGrid::wxGenericGrid(void)
   m_editable = TRUE;
 #if defined(__WIN95__)
   m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X);
-#elseif defined(__WXGTK__)
+#elif defined(__WXGTK__)
   m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X);
 #else
   m_scrollWidth = 16;
@@ -146,7 +146,7 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
   m_editable = TRUE;
 #if defined(__WIN95__)
   m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X);
-#elseif defined(__WXGTK__)
+#elif defined(__WXGTK__)
   m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X);
 #else
   m_scrollWidth = 16;
@@ -222,6 +222,8 @@ bool wxGenericGrid::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos,
   m_hScrollBar = new wxScrollBar(this, wxGRID_HSCROLL, wxPoint(0, 0), wxSize(20, 100), wxHORIZONTAL);
   m_vScrollBar = new wxScrollBar(this, wxGRID_VSCROLL, wxPoint(0, 0), wxSize(100, 20), wxVERTICAL);
 
+  SetSize(-1, -1, size.x, size.y);
+
   return TRUE;
 }
 
@@ -1024,7 +1026,7 @@ void wxGenericGrid::AdjustScrollbars(void)
   if (m_hScrollBar && !m_hScrollBar->IsShown())
     horizScrollBarHeight = 0;
 
-  if (m_hScrollBar)
+  if (m_hScrollBar && m_hScrollBar->IsShown())
   {
     int nCols = GetCols();
     m_hScrollBar->SetScrollbar(m_hScrollBar->GetThumbPosition(), wxMax(noHorizSteps, 1), (noHorizSteps == 0) ? 1 : nCols, wxMax(noHorizSteps, 1));
@@ -1038,7 +1040,7 @@ void wxGenericGrid::AdjustScrollbars(void)
 
   }
 
-  if (m_vScrollBar)
+  if (m_vScrollBar && m_vScrollBar->IsShown())
   {
     int nRows = GetRows();