+void GridFrame::AutoSizeRow(wxCommandEvent& WXUNUSED(event))
+{
+ wxGridUpdateLocker locker(grid);
+ const wxArrayInt sels = grid->GetSelectedRows();
+ for ( size_t n = 0, count = sels.size(); n < count; n++ )
+ {
+ grid->AutoSizeRow( sels[n], false );
+ }
+}
+
+void GridFrame::AutoSizeCol(wxCommandEvent& WXUNUSED(event))
+{
+ wxGridUpdateLocker locker(grid);
+ const wxArrayInt sels = grid->GetSelectedCols();
+ for ( size_t n = 0, count = sels.size(); n < count; n++ )
+ {
+ grid->AutoSizeColumn( sels[n], false );
+ }
+}
+
+void GridFrame::AutoSizeRowLabel(wxCommandEvent& WXUNUSED(event))
+{
+ wxGridUpdateLocker locker(grid);
+ const wxArrayInt sels = grid->GetSelectedRows();
+ for ( size_t n = 0, count = sels.size(); n < count; n++ )
+ {
+ grid->AutoSizeRowLabelSize( sels[n] );
+ }
+}
+
+void GridFrame::AutoSizeColLabel(wxCommandEvent& WXUNUSED(event))
+{
+ wxGridUpdateLocker locker(grid);
+ const wxArrayInt sels = grid->GetSelectedCols();
+ for ( size_t n = 0, count = sels.size(); n < count; n++ )
+ {
+ grid->AutoSizeColLabelSize( sels[n] );
+ }
+}
+
+void GridFrame::AutoSizeLabelsCol(wxCommandEvent& WXUNUSED(event))
+{
+ grid->SetColLabelSize( wxGRID_AUTOSIZE );
+}
+
+void GridFrame::AutoSizeLabelsRow(wxCommandEvent& WXUNUSED(event))
+{
+ grid->SetRowLabelSize( wxGRID_AUTOSIZE );
+}
+
+void GridFrame::AutoSizeTable(wxCommandEvent& WXUNUSED(event))
+{
+ grid->AutoSize();
+}
+
+