wxButton::SetDefault

void SetDefault(void)

This sets the button to be the default item for the panel or dialog box. Under XView, the default item is highlighted, and pressing the return key executes the callback for the item (but with no visual feedback, and only if a text item does not have the focus).

Under Windows 3, only dialog box buttons respond to this function. As normal under Windows 3 and Motif, pressing return causes the default button to be depressed when the return key is pressed. See also wxWindow::SetFocus which sets the keyboard focus for windows and text panel items, wxPanel::OnDefaultAction and wxPanel::GetDefaultItem.