support for enable/disable and capitalization in ios
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76525 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -601,6 +601,13 @@ bool wxUITextFieldControl::CanPaste() const
|
|||||||
|
|
||||||
void wxUITextFieldControl::SetEditable(bool editable)
|
void wxUITextFieldControl::SetEditable(bool editable)
|
||||||
{
|
{
|
||||||
|
if (m_textField) {
|
||||||
|
if ( !editable ) {
|
||||||
|
[m_textField resignFirstResponder];
|
||||||
|
}
|
||||||
|
|
||||||
|
[m_textField setEnabled: editable];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxUITextFieldControl::GetSelection( long* from, long* to) const
|
void wxUITextFieldControl::GetSelection( long* from, long* to) const
|
||||||
@@ -733,6 +740,11 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer,
|
|||||||
if ( style & wxTE_PASSWORD )
|
if ( style & wxTE_PASSWORD )
|
||||||
[tv setSecureTextEntry:YES];
|
[tv setSecureTextEntry:YES];
|
||||||
|
|
||||||
|
if ( style & wxTE_CAPITALIZE )
|
||||||
|
[tv setAutocapitalizationType:UITextAutocapitalizationTypeWords];
|
||||||
|
else
|
||||||
|
[tv setAutocapitalizationType:UITextAutocapitalizationTypeSentences];
|
||||||
|
|
||||||
if ( !(style & wxTE_MULTILINE) )
|
if ( !(style & wxTE_MULTILINE) )
|
||||||
{
|
{
|
||||||
[tv setAutocorrectionType:UITextAutocorrectionTypeNo];
|
[tv setAutocorrectionType:UITextAutocorrectionTypeNo];
|
||||||
|
Reference in New Issue
Block a user