Add wxGridCellRenderer::GetBest{Height,Width}() and use them in wxGrid.
Allow the renderer to specify the best height at the given width (or vice versa) instead of the best size in both direction which is not defined for e.g. wxGridCellAutoWrapStringRenderer. Closes #15943. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76451 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -238,6 +238,18 @@ public:
|
||||
wxDC& dc,
|
||||
int row, int col) wxOVERRIDE;
|
||||
|
||||
virtual int GetBestHeight(wxGrid& grid,
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc,
|
||||
int row, int col,
|
||||
int width) wxOVERRIDE;
|
||||
|
||||
virtual int GetBestWidth(wxGrid& grid,
|
||||
wxGridCellAttr& attr,
|
||||
wxDC& dc,
|
||||
int row, int col,
|
||||
int height) wxOVERRIDE;
|
||||
|
||||
virtual wxGridCellRenderer *Clone() const wxOVERRIDE
|
||||
{ return new wxGridCellAutoWrapStringRenderer; }
|
||||
|
||||
|
Reference in New Issue
Block a user