column autosizing added
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6213 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -959,8 +959,13 @@ BugsGridFrame::BugsGridFrame()
|
||||
wxGridTableBase *table = new BugsGridTable();
|
||||
grid->SetTable(table, TRUE);
|
||||
|
||||
for ( size_t row = 0; row < WXSIZEOF(gs_dataBugsGrid); row++ )
|
||||
{
|
||||
grid->SetReadOnly(row, Col_Id);
|
||||
}
|
||||
wxGridCellAttr *attrRO = new wxGridCellAttr,
|
||||
*attrRangeEditor = new wxGridCellAttr;
|
||||
attrRO->SetReadOnly();
|
||||
attrRangeEditor->SetEditor(new wxGridCellNumberEditor(1, 5));
|
||||
|
||||
grid->SetColAttr(Col_Id, attrRO);
|
||||
grid->SetColAttr(Col_Priority, attrRangeEditor);
|
||||
|
||||
grid->AutoSizeColumns();
|
||||
}
|
||||
|
Reference in New Issue
Block a user