Add wxTextEntryDialog::SetMaxLength().
Allow restricting the maximal number of characters that can be entered in wxTextEntryDialog. Closes #15158. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73832 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -629,6 +629,7 @@ All (GUI):
|
|||||||
- Add wxDocManager::FindDocumentByPath() (troelsk).
|
- Add wxDocManager::FindDocumentByPath() (troelsk).
|
||||||
- Add wxEVT_GRID_COL_AUTO_SIZE event (Igor Korot).
|
- Add wxEVT_GRID_COL_AUTO_SIZE event (Igor Korot).
|
||||||
- Add chainable wxWizardPageSimple::Chain() overload.
|
- Add chainable wxWizardPageSimple::Chain() overload.
|
||||||
|
- Add wxTextEntryDialog::SetMaxLength() (derEine).
|
||||||
|
|
||||||
wxGTK:
|
wxGTK:
|
||||||
|
|
||||||
|
@@ -62,6 +62,8 @@ public:
|
|||||||
void SetValue(const wxString& val);
|
void SetValue(const wxString& val);
|
||||||
wxString GetValue() const { return m_value; }
|
wxString GetValue() const { return m_value; }
|
||||||
|
|
||||||
|
void SetMaxLength(unsigned long len);
|
||||||
|
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
void SetTextValidator( const wxTextValidator& validator );
|
void SetTextValidator( const wxTextValidator& validator );
|
||||||
#if WXWIN_COMPATIBILITY_2_8
|
#if WXWIN_COMPATIBILITY_2_8
|
||||||
|
@@ -159,6 +159,16 @@ public:
|
|||||||
void SetTextValidator(wxTextValidatorStyle style = wxFILTER_NONE);
|
void SetTextValidator(wxTextValidatorStyle style = wxFILTER_NONE);
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
/**
|
||||||
|
This function sets the maximum number of characters the user can enter
|
||||||
|
into this dialog.
|
||||||
|
|
||||||
|
@see wxTextEntry::SetMaxLength()
|
||||||
|
|
||||||
|
@since 2.9.5
|
||||||
|
*/
|
||||||
|
void SetMaxLength(unsigned long len);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the default text value.
|
Sets the default text value.
|
||||||
*/
|
*/
|
||||||
|
@@ -151,6 +151,11 @@ void wxTextEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event) )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxTextEntryDialog::SetMaxLength(unsigned long len)
|
||||||
|
{
|
||||||
|
m_textctrl->SetMaxLength(len);
|
||||||
|
}
|
||||||
|
|
||||||
void wxTextEntryDialog::SetValue(const wxString& val)
|
void wxTextEntryDialog::SetValue(const wxString& val)
|
||||||
{
|
{
|
||||||
m_value = val;
|
m_value = val;
|
||||||
|
Reference in New Issue
Block a user