Commit 625ed22f authored by dickelbeck's avatar dickelbeck

portable SetFocus() example

parent 10b14fea
......@@ -51,6 +51,8 @@ BEGIN_EVENT_TABLE( WinEDA_PcbTracksDialog, wxDialog )
EVT_BUTTON( wxID_CANCEL, WinEDA_PcbTracksDialog::OnCancelClick )
EVT_ACTIVATE( WinEDA_PcbTracksDialog::OnActivate )
////@end WinEDA_PcbTracksDialog event table entries
END_EVENT_TABLE()
......@@ -69,6 +71,22 @@ WinEDA_PcbTracksDialog::WinEDA_PcbTracksDialog( WinEDA_PcbFrame* parent, wxWindo
Create(parent, id, caption, pos, size, style);
}
/**
* Function OnActivate
* gets control when the dialog becomes activated.
* After creation, not during creation.
*/
void WinEDA_PcbTracksDialog::OnActivate( wxActivateEvent& event )
{
m_OptViaSize->SetFocus();
// deselect the existing text, seems SetFocus() wants to emulate Microsoft, which is not desireable here.
m_OptViaSize->SetSelection(0,0);
event.Skip();
}
/*!
* WinEDA_PcbTracksDialog creator
*/
......
......@@ -88,6 +88,13 @@ public:
/// wxEVT_COMMAND_BUTTON_CLICKED event handler for wxID_CANCEL
void OnCancelClick( wxCommandEvent& event );
/**
* Function OnActivate
* gets control when the dialog becomes activated.
* After creation, not during creation.
*/
void OnActivate( wxActivateEvent& event );
////@end WinEDA_PcbTracksDialog event handler declarations
////@begin WinEDA_PcbTracksDialog member function declarations
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment