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;
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;
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(pos.x, pos.y, 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));
}
- if (m_vScrollBar)
+ if (m_vScrollBar && m_vScrollBar->IsShown())
{
int nRows = GetRows();
// Probably because of the SetValue?? JS.
// 2) Arrrrrgh. This isn't needed anywhere,
// of course. One hour of debugging... RR.
-#ifndef __WXMSW__
-// HighlightCell(dc);
+ // Put back for Motif only on advice of Michael Bedward
+#ifdef __WXMOTIF__
+ HighlightCell(dc);
#endif
+
dc->DestroyClippingRegion();
//OnSelectCell(row, col);
if (!cell)
return;
- static char szEdit[300];
+ static wxChar szEdit[300];
wxClientDC dc(this);
dc.BeginDrawing();
dc.SetBackgroundMode(wxTRANSPARENT);
dc.SetBrush(cell->GetBackgroundBrush());
- strcpy(szEdit, m_textItem->GetValue());
+ wxStrcpy(szEdit, m_textItem->GetValue());
wxRect rect;
rect = m_currentRect;
rect.width -= 5;
rect.height -= 4;
- DrawTextRect(& dc, " ", &rect, wxLEFT);
+ DrawTextRect(& dc, _T(" "), &rect, wxLEFT);
DrawTextRect(& dc, szEdit, &rect, cell->GetAlignment());
dc.DestroyClippingRegion();