// Name: grid.h
// Purpose: interface of wxGrid and related classes
// Author: wxWidgets team
-// RCS-ID: $Id$
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
{
public:
/**
- Default constructor.
+ Text cell editor constructor.
+
+ @param maxChars
+ Maximum width of text (this parameter is supported starting since
+ wxWidgets 2.9.5).
*/
- wxGridCellTextEditor();
+ explicit wxGridCellTextEditor(size_t maxChars = 0);
/**
The parameters string format is "n" where n is a number representing
the maximum width.
*/
virtual void SetParameters(const wxString& params);
+
+ /**
+ Set validator to validate user input.
+
+ @since 2.9.5
+ */
+ virtual void SetValidator(const wxValidator& validator);
};
/**
type.
@event{EVT_GRID_COL_SIZE(func)}
Same as EVT_GRID_CMD_COL_SIZE() but uses `wxID_ANY` id.
+ @event{EVT_GRID_COL_AUTO_SIZE(func)}
+ This event is sent when a column must be resized to its best size, e.g.
+ when the user double clicks the column divider. The default
+ implementation simply resizes the column to fit the column label (but
+ not its contents as this could be too slow for big grids). This macro
+ corresponds to @c wxEVT_GRID_COL_AUTO_SIZE event type and is new since
+ wxWidgets 2.9.5.
@event{EVT_GRID_ROW_SIZE(func)}
Same as EVT_GRID_CMD_ROW_SIZE() but uses `wxID_ANY` id.
@endEventTable
wxEventType wxEVT_GRID_LABEL_RIGHT_DCLICK;
wxEventType wxEVT_GRID_ROW_SIZE;
wxEventType wxEVT_GRID_COL_SIZE;
+wxEventType wxEVT_GRID_COL_AUTO_SIZE;
wxEventType wxEVT_GRID_RANGE_SELECT;
wxEventType wxEVT_GRID_CELL_CHANGING;
wxEventType wxEVT_GRID_CELL_CHANGED;