Really fix initial text selection in wxTextEntryDialog
Focus the text control after changing its value, this ensures that all text in
it is initially selected, allowing the user to easily replace it if necessary.
This was also the intention of bd9171c2ad
, but
it was insufficient for wxGTK where changing the text control value seems to
reset its selection, unlike in wxMSW where the selection is preserved.
See https://github.com/wxWidgets/wxWidgets/pull/266
This commit is contained in:
parent
b4ffe734c1
commit
e209beed8e
@ -126,8 +126,6 @@ bool wxTextEntryDialog::Create(wxWindow *parent,
|
||||
if ( style & wxCENTRE )
|
||||
Centre( wxBOTH );
|
||||
|
||||
m_textctrl->SetFocus();
|
||||
|
||||
wxEndBusyCursor();
|
||||
|
||||
return true;
|
||||
@ -138,7 +136,7 @@ bool wxTextEntryDialog::TransferDataToWindow()
|
||||
if ( m_textctrl )
|
||||
{
|
||||
m_textctrl->SetValue(m_value);
|
||||
m_textctrl->SelectAll();
|
||||
m_textctrl->SetFocus();
|
||||
}
|
||||
|
||||
return wxDialog::TransferDataToWindow();
|
||||
|
Loading…
Reference in New Issue
Block a user