Focus generic spin control when its spin button is pressed.
This is consistent with the behaviour of the native control under MSW and GTK and generally makes sense as otherwise focus could remain on a completely unrelated control. Closes #15885. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75645 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -404,6 +404,10 @@ void wxSpinCtrlGenericBase::OnSpinButton(wxSpinEvent& event)
|
|||||||
{
|
{
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
|
||||||
|
// Pressing the spin button should also give the focus to the text part of
|
||||||
|
// the control, at least this is how the native control behaves under MSW.
|
||||||
|
SetFocus();
|
||||||
|
|
||||||
// Sync the textctrl since the user expects that the button will modify
|
// Sync the textctrl since the user expects that the button will modify
|
||||||
// what they see in the textctrl.
|
// what they see in the textctrl.
|
||||||
SyncSpinToText(SendEvent_None);
|
SyncSpinToText(SendEvent_None);
|
||||||
|
Reference in New Issue
Block a user