Add wxTextEntryDialog::ForceUpper()
Just forward it to wxTextCtrll::ForceUpper(). Closes #17291.
This commit is contained in:
@@ -92,6 +92,7 @@ All (GUI):
|
||||
- Add wxAddRemoveCtrl.
|
||||
- Add wxAppProgressIndicator for MSW (Chaobin Zhang) and OS X (Tobias Taschner).
|
||||
- Add wxTextEntry::ForceUpper().
|
||||
- Add wxTextEntryDialog::ForceUpper().
|
||||
- Add wxEVT_MAGNIFY mouse event (Joost Nieuwenhuijse).
|
||||
- Add wxProcess::Activate().
|
||||
- Fix setting colours of labels in wxSlider.
|
||||
|
@@ -63,6 +63,8 @@ public:
|
||||
|
||||
void SetMaxLength(unsigned long len);
|
||||
|
||||
void ForceUpper();
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
void SetTextValidator( const wxTextValidator& validator );
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
|
@@ -173,6 +173,20 @@ public:
|
||||
*/
|
||||
void SetValue(const wxString& value);
|
||||
|
||||
/**
|
||||
Convert all text entered into the text control used by the dialog to upper case.
|
||||
|
||||
Call this method to ensure that all text entered into the text control
|
||||
used by the dialog is converted on the fly to upper case. If the text
|
||||
control is not empty, its existing contents is also converted to upper
|
||||
case.
|
||||
|
||||
@see wxTextEntry::ForceUpper()
|
||||
|
||||
@since 3.1.0
|
||||
*/
|
||||
void ForceUpper();
|
||||
|
||||
/**
|
||||
Shows the dialog, returning wxID_OK if the user pressed OK, and wxID_CANCEL
|
||||
otherwise.
|
||||
|
@@ -130,14 +130,20 @@ bool wxTextEntryDialog::Create(wxWindow *parent,
|
||||
|
||||
bool wxTextEntryDialog::TransferDataToWindow()
|
||||
{
|
||||
if ( m_textctrl )
|
||||
{
|
||||
m_textctrl->SetValue(m_value);
|
||||
}
|
||||
|
||||
return wxDialog::TransferDataToWindow();
|
||||
}
|
||||
|
||||
bool wxTextEntryDialog::TransferDataFromWindow()
|
||||
{
|
||||
if ( m_textctrl )
|
||||
{
|
||||
m_value = m_textctrl->GetValue();
|
||||
}
|
||||
|
||||
return wxDialog::TransferDataFromWindow();
|
||||
}
|
||||
@@ -152,9 +158,10 @@ void wxTextEntryDialog::OnOK(wxCommandEvent& WXUNUSED(event) )
|
||||
|
||||
void wxTextEntryDialog::SetMaxLength(unsigned long len)
|
||||
{
|
||||
wxCHECK_RET( m_textctrl, wxS("Must be created first") );
|
||||
|
||||
if ( m_textctrl )
|
||||
{
|
||||
m_textctrl->SetMaxLength(len);
|
||||
}
|
||||
}
|
||||
|
||||
void wxTextEntryDialog::SetValue(const wxString& val)
|
||||
@@ -167,6 +174,14 @@ void wxTextEntryDialog::SetValue(const wxString& val)
|
||||
}
|
||||
}
|
||||
|
||||
void wxTextEntryDialog::ForceUpper()
|
||||
{
|
||||
if ( m_textctrl )
|
||||
{
|
||||
m_textctrl->ForceUpper();
|
||||
}
|
||||
}
|
||||
|
||||
#if wxUSE_VALIDATORS
|
||||
|
||||
#if WXWIN_COMPATIBILITY_2_8
|
||||
@@ -183,9 +198,10 @@ void wxTextEntryDialog::SetTextValidator( wxTextValidatorStyle style )
|
||||
|
||||
void wxTextEntryDialog::SetTextValidator( const wxTextValidator& validator )
|
||||
{
|
||||
wxCHECK_RET( m_textctrl, wxS("Must be created first") );
|
||||
|
||||
if ( m_textctrl )
|
||||
{
|
||||
m_textctrl->SetValidator( validator );
|
||||
}
|
||||
}
|
||||
|
||||
#endif // wxUSE_VALIDATORS
|
||||
|
Reference in New Issue
Block a user