If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
ONEEYEMAN wrote:Hi,
What is an exact scenario that you need for re-creating wxGrid?
Excactly this is not necessary, the scenario:
1. wxGrid::CreateGrid is encapsulated in a function
2. The function would like to return false with logs when failing without terminating the program, this could not be implemented
When wxGrid::CreateGrid is called twice or more times for the same wxGrid.
For example, the same wxGrid is to filled by different data with different rows and cols.
wxGrid::CreateGrid()
int row_count = GetNumberRows();
if (row_count > 0)
DeleteRows(0, row_count, false);
int col_count = GetNumberCols();
if (col_count > 0)
DeleteCols(0, col_count, false);
wxGrid::CreateGrid() // not work
Hi,
If its just a different size if the grid - why not use Append{Row,Col} functions?
On top of everything it will be faster than re-creating the whole grid...