diff --git a/src/osx/iphone/textctrl.mm b/src/osx/iphone/textctrl.mm index 8fa70b90ad..b4e9a8fb0f 100644 --- a/src/osx/iphone/textctrl.mm +++ b/src/osx/iphone/textctrl.mm @@ -601,6 +601,13 @@ bool wxUITextFieldControl::CanPaste() const 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 @@ -733,6 +740,11 @@ wxWidgetImplType* wxWidgetImpl::CreateTextControl( wxTextCtrl* wxpeer, if ( style & wxTE_PASSWORD ) [tv setSecureTextEntry:YES]; + if ( style & wxTE_CAPITALIZE ) + [tv setAutocapitalizationType:UITextAutocapitalizationTypeWords]; + else + [tv setAutocapitalizationType:UITextAutocapitalizationTypeSentences]; + if ( !(style & wxTE_MULTILINE) ) { [tv setAutocorrectionType:UITextAutocorrectionTypeNo];