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:
Stefan Csomor 2014-05-13 20:48:46 +00:00
parent 3da156b1be
commit f90f4c27ea

View File

@ -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];