added support for readonly cells and 3d border drawing
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6094 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -95,7 +95,6 @@ BEGIN_EVENT_TABLE( GridFrame, wxFrame )
|
||||
EVT_GRID_SELECT_CELL( GridFrame::OnSelectCell )
|
||||
EVT_GRID_RANGE_SELECT( GridFrame::OnRangeSelected )
|
||||
EVT_GRID_CELL_CHANGE( GridFrame::OnCellValueChanged )
|
||||
|
||||
END_EVENT_TABLE()
|
||||
|
||||
|
||||
@@ -187,6 +186,8 @@ GridFrame::GridFrame()
|
||||
|
||||
grid->SetCellValue( 0, 1, "Blah" );
|
||||
grid->SetCellValue( 0, 2, "Blah" );
|
||||
grid->SetCellValue( 0, 3, "Read only" );
|
||||
grid->SetReadOnly( 0, 3 );
|
||||
|
||||
grid->SetCellValue( 0, 5, "Press\nCtrl+arrow\nto skip over\ncells" );
|
||||
|
||||
@@ -212,6 +213,9 @@ GridFrame::GridFrame()
|
||||
attr->SetBackgroundColour(*wxBLUE);
|
||||
grid->SetRowAttr(5, attr);
|
||||
|
||||
// VZ: cell borders don't look nice otherwise :-) (for now...)
|
||||
grid->SetDefaultCellBackgroundColour(wxColour(200, 200, 180));
|
||||
|
||||
wxBoxSizer *topSizer = new wxBoxSizer( wxVERTICAL );
|
||||
topSizer->Add( grid,
|
||||
1,
|
||||
|
Reference in New Issue
Block a user