Add wxGridFitMode and functions working with it
Replace "bool overflow" flag with a class allowing to specify the same overflow/clipping behaviour currently, but also allowing to extend it, notable to add ellipsization support, in the future. Preserve the existing API by reimplementing it in terms of the new one. Also update the same to demonstrate a cell which always overflows, independently of the default cell behaviour.
This commit is contained in:
@@ -501,6 +501,9 @@ GridFrame::GridFrame()
|
||||
grid->SetCellValue( 99, 99, "Ctrl+End\nwill go to\nthis cell" );
|
||||
grid->SetCellValue( 1, 0, "This default cell will overflow into neighboring cells, but not if you turn overflow off.");
|
||||
|
||||
grid->SetCellValue(2, 0, "This one always overflows");
|
||||
grid->SetCellFitMode(2, 0, wxGridFitMode::Overflow());
|
||||
|
||||
grid->SetCellTextColour(1, 2, *wxRED);
|
||||
grid->SetCellBackgroundColour(1, 2, *wxGREEN);
|
||||
|
||||
|
Reference in New Issue
Block a user