m_editable = TRUE;
#if defined(__WIN95__)
m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X);
+#elif defined(__WXGTK__)
+ m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X);
#else
m_scrollWidth = 16;
#endif
m_editable = TRUE;
#if defined(__WIN95__)
m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X);
+#elif defined(__WXGTK__)
+ m_scrollWidth = wxSystemSettings::GetSystemMetric(wxSYS_VSCROLL_X);
#else
m_scrollWidth = 16;
#endif
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;
}
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));
- m_hScrollBar->SetSize(m_leftOfSheet, ch - m_scrollWidth -2,
+/*
+ m_hScrollBar->SetSize(m_leftOfSheet, ch - m_scrollWidth -2, // why -2 ? Robert.
cw - vertScrollBarWidth - m_leftOfSheet, m_scrollWidth);
+*/
+ m_hScrollBar->SetSize(m_leftOfSheet, ch - m_scrollWidth,
+ cw - vertScrollBarWidth - m_leftOfSheet, m_scrollWidth);
+
}
- if (m_vScrollBar)
+ if (m_vScrollBar && m_vScrollBar->IsShown())
{
int nRows = GetRows();
{
m_editingPanel->SetSize(0, 0, cw, m_editControlPosition.height + m_editControlPosition.y + 2);
GetTextItem()->SetSize(m_editControlPosition.x, m_editControlPosition.y,
- cw - m_editControlPosition.x, m_editControlPosition.height);
+ cw - 2*m_editControlPosition.x, m_editControlPosition.height);
}
}