Use SelectAll() instead of SetSelection(-1, -1).
The former is more clear and also shorter. Closes #14701. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72566 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -765,7 +765,7 @@ void wxComboBoxExtraInputHandler::OnFocus(wxFocusEvent& event)
|
|||||||
if ( m_combo->GetTextCtrl() )
|
if ( m_combo->GetTextCtrl() )
|
||||||
m_combo->GetTextCtrl()->SelectAll();
|
m_combo->GetTextCtrl()->SelectAll();
|
||||||
else
|
else
|
||||||
m_combo->SetSelection(-1,-1);
|
m_combo->SelectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send focus indication to parent.
|
// Send focus indication to parent.
|
||||||
|
@@ -496,7 +496,7 @@ void wxGridCellTextEditor::DoBeginEdit(const wxString& startValue)
|
|||||||
{
|
{
|
||||||
Text()->SetValue(startValue);
|
Text()->SetValue(startValue);
|
||||||
Text()->SetInsertionPointEnd();
|
Text()->SetInsertionPointEnd();
|
||||||
Text()->SetSelection(-1, -1);
|
Text()->SelectAll();
|
||||||
Text()->SetFocus();
|
Text()->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -122,7 +122,7 @@ wxTextEntryDialog::wxTextEntryDialog(wxWindow *parent,
|
|||||||
if ( style & wxCENTRE )
|
if ( style & wxCENTRE )
|
||||||
Centre( wxBOTH );
|
Centre( wxBOTH );
|
||||||
|
|
||||||
m_textctrl->SetSelection(-1, -1);
|
m_textctrl->SelectAll();
|
||||||
m_textctrl->SetFocus();
|
m_textctrl->SetFocus();
|
||||||
|
|
||||||
wxEndBusyCursor();
|
wxEndBusyCursor();
|
||||||
|
@@ -454,7 +454,7 @@ wxTreeTextCtrl::wxTreeTextCtrl(wxGenericTreeCtrl *owner,
|
|||||||
(void)Create(m_owner, wxID_ANY, m_startValue,
|
(void)Create(m_owner, wxID_ANY, m_startValue,
|
||||||
rect.GetPosition(), rect.GetSize());
|
rect.GetPosition(), rect.GetSize());
|
||||||
|
|
||||||
SetSelection(-1, -1);
|
SelectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxTreeTextCtrl::EndEdit(bool discardChanges)
|
void wxTreeTextCtrl::EndEdit(bool discardChanges)
|
||||||
|
@@ -497,7 +497,7 @@ void wxPGTextCtrlEditor_OnFocus( wxPGProperty* property,
|
|||||||
tc->SetValue(correctText);
|
tc->SetValue(correctText);
|
||||||
}
|
}
|
||||||
|
|
||||||
tc->SetSelection(-1,-1);
|
tc->SelectAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxPGTextCtrlEditor::OnFocus( wxPGProperty* property,
|
void wxPGTextCtrlEditor::OnFocus( wxPGProperty* property,
|
||||||
|
Reference in New Issue
Block a user