Add support for editing dates (without time) to wxGrid
Add wxGridCellDateRenderer and wxGridCellDateRenderer which can be used for the grid cells containing only dates, without times. Also add wxGrid::SetColFormatDate() convenience function. Refactor wxGridCellDateTimeRenderer slightly to reuse its code. Closes https://github.com/wxWidgets/wxWidgets/pull/1101
This commit is contained in:
committed by
Vadim Zeitlin
parent
ee352d79c8
commit
659ab78c6d
@@ -48,6 +48,7 @@ extern WXDLLIMPEXP_DATA_CORE(const char) wxGridNameStr[];
|
||||
#define wxGRID_VALUE_NUMBER wxT("long")
|
||||
#define wxGRID_VALUE_FLOAT wxT("double")
|
||||
#define wxGRID_VALUE_CHOICE wxT("choice")
|
||||
#define wxGRID_VALUE_DATE wxT("date")
|
||||
|
||||
#define wxGRID_VALUE_TEXT wxGRID_VALUE_STRING
|
||||
#define wxGRID_VALUE_LONG wxGRID_VALUE_NUMBER
|
||||
@@ -99,6 +100,9 @@ class WXDLLIMPEXP_FWD_CORE wxTextCtrl;
|
||||
#if wxUSE_SPINCTRL
|
||||
class WXDLLIMPEXP_FWD_CORE wxSpinCtrl;
|
||||
#endif
|
||||
#if wxUSE_DATEPICKCTRL
|
||||
class WXDLLIMPEXP_FWD_CORE wxDatePickerCtrl;
|
||||
#endif
|
||||
|
||||
class wxGridFixedIndicesSet;
|
||||
|
||||
@@ -1354,6 +1358,7 @@ public:
|
||||
void SetColFormatBool(int col);
|
||||
void SetColFormatNumber(int col);
|
||||
void SetColFormatFloat(int col, int width = -1, int precision = -1);
|
||||
void SetColFormatDate(int col, const wxString& format = wxString());
|
||||
void SetColFormatCustom(int col, const wxString& typeName);
|
||||
|
||||
// ------ row and col formatting
|
||||
|
Reference in New Issue
Block a user