m_cellTextColour = *wxBLACK;
m_cellBackgroundColour = *wxWHITE;
m_labelTextColour = *wxBLACK;
- m_labelBackgroundColour = *wxLIGHT_GREY;
+// m_labelBackgroundColour = *wxLIGHT_GREY;
+ m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
m_labelBackgroundBrush = NULL;
m_labelTextFont = NULL;
m_cellTextFont = NULL;
m_cellTextColour = *wxBLACK;
m_cellBackgroundColour = *wxWHITE;
m_labelTextColour = *wxBLACK;
- m_labelBackgroundColour = *wxLIGHT_GREY;
+// m_labelBackgroundColour = *wxLIGHT_GREY;
+ m_labelBackgroundColour = wxSystemSettings::GetSystemColour( wxSYS_COLOUR_BTNFACE );
m_labelBackgroundBrush = NULL;
m_labelTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxBOLD);
m_cellTextFont = wxTheFontList->FindOrCreateFont(10, wxSWISS, wxNORMAL, wxNORMAL);
int objectSizeX = m_totalCols;
int pageSizeX = 1;
int viewLengthX = m_totalCols;
+
+/*
m_hScrollBar->SetViewLength(viewLengthX);
m_hScrollBar->SetObjectLength(objectSizeX);
m_hScrollBar->SetPageSize(pageSizeX);
+*/
+ m_hScrollBar->SetScrollbar(m_hScrollBar->GetPosition(), pageSizeX, objectSizeX, viewLengthX);
int objectSizeY = m_totalRows;
int pageSizeY = 1;
int viewLengthY = m_totalRows;
+/*
m_vScrollBar->SetViewLength(viewLengthY);
m_vScrollBar->SetObjectLength(objectSizeY);
m_vScrollBar->SetPageSize(pageSizeY);
+*/
+
+ m_vScrollBar->SetScrollbar(m_vScrollBar->GetPosition(), pageSizeY, objectSizeY, viewLengthY);
AdjustScrollbars();
// Erase (some of) the background.
// Currently, a Windows-only optimisation.
-void wxGenericGrid::OnEraseBackground(wxEraseEvent& event)
+void wxGenericGrid::OnEraseBackground(wxEraseEvent& WXUNUSED(event) )
{
wxClientDC dc(this);
dc.BeginDrawing();
{
dc->SetBrush(*cell->GetBackgroundBrush());
dc->SetPen(*wxTRANSPARENT_PEN);
+
+#if 0 // In wxWin 2.0 the dc code is exact. RR.
#ifdef __WXMOTIF__
dc->DrawRectangle(rect->x+1, rect->y+1, rect->width-1, rect->height-1);
#else
dc->DrawRectangle(rect->x+1, rect->y+1, rect->width, rect->height);
#endif
+#endif
+
+ dc->DrawRectangle(rect->x+1, rect->y+1, rect->width-1, rect->height-1);
+
dc->SetPen(*wxBLACK_PEN);
}
}
*/
m_hScrollBar->SetScrollbar(m_hScrollBar->GetPosition(), wxMax(noHorizSteps, 1), nCols, wxMax(noHorizSteps, 1));
- m_hScrollBar->SetSize(m_leftOfSheet, ch - m_scrollWidth,
+ m_hScrollBar->SetSize(m_leftOfSheet, ch - m_scrollWidth -2,
cw - vertScrollBarWidth - m_leftOfSheet, m_scrollWidth);
}
// Why isn't this needed for Windows??
// Probably because of the SetValue??
+ // Arrrrrgh. This isn't needed anywhere, of course. RR.
#ifndef __WXMSW__
- HighlightCell(dc);
+// HighlightCell(dc);
#endif
dc->DestroyClippingRegion();
void wxGenericGrid::HighlightCell(wxDC *dc)
{
dc->SetLogicalFunction(wxINVERT);
+
// Top
- dc->DrawLine(m_currentRect.x + 1, m_currentRect.y + 1, m_currentRect.x + m_currentRect.width - 1, m_currentRect.y + 1);
+ dc->DrawLine( m_currentRect.x + 1,
+ m_currentRect.y + 1,
+ m_currentRect.x + m_currentRect.width - 1,
+ m_currentRect.y + 1);
// Right
- dc->DrawLine(m_currentRect.x + m_currentRect.width - 1, m_currentRect.y + 1,
- m_currentRect.x + m_currentRect.width - 1, m_currentRect.y +m_currentRect.height - 1);
+ dc->DrawLine( m_currentRect.x + m_currentRect.width - 1,
+ m_currentRect.y + 1,
+ m_currentRect.x + m_currentRect.width - 1,
+ m_currentRect.y +m_currentRect.height - 1 );
// Bottom
- dc->DrawLine(m_currentRect.x + m_currentRect.width - 1, m_currentRect.y + m_currentRect.height - 1,
- m_currentRect.x + 1, m_currentRect.y + m_currentRect.height - 1);
+ dc->DrawLine( m_currentRect.x + m_currentRect.width - 1,
+ m_currentRect.y + m_currentRect.height - 1,
+ m_currentRect.x + 1,
+ m_currentRect.y + m_currentRect.height - 1);
// Left
- dc->DrawLine(m_currentRect.x + 1, m_currentRect.y + m_currentRect.height - 1, m_currentRect.x + 1, m_currentRect.y + 1);
+ dc->DrawLine( m_currentRect.x + 1,
+ m_currentRect.y + m_currentRect.height - 1,
+ m_currentRect.x + 1,
+ m_currentRect.y + 1);
dc->SetLogicalFunction(wxCOPY);
}