Commit 1bb2da51 authored by dickelbeck's avatar dickelbeck

set initial keyboard focus

parent dbbd6e40
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Name: dialog_find.cpp // Name: dialog_find.cpp
// Purpose: // Purpose:
// Author: jean-pierre Charras // Author: jean-pierre Charras
// Modified by: // Modified by:
// Created: 16/02/2006 20:18:11 // Created: 16/02/2006 20:18:11
// RCS-ID: // RCS-ID:
// Copyright: License GNU // Copyright: License GNU
// Licence: // Licence:
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
// Generated by DialogBlocks (unregistered), 16/02/2006 20:18:11 // Generated by DialogBlocks (unregistered), 16/02/2006 20:18:11
...@@ -59,7 +59,7 @@ WinEDA_FindFrame::WinEDA_FindFrame( ) ...@@ -59,7 +59,7 @@ WinEDA_FindFrame::WinEDA_FindFrame( )
WinEDA_FindFrame::WinEDA_FindFrame( WinEDA_SchematicFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ) WinEDA_FindFrame::WinEDA_FindFrame( WinEDA_SchematicFrame* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style )
{ {
m_Parent = parent; m_Parent = parent;
Create(parent, id, caption, pos, size, style); Create(parent, id, caption, pos, size, style);
} }
...@@ -82,6 +82,16 @@ bool WinEDA_FindFrame::Create( wxWindow* parent, wxWindowID id, const wxString& ...@@ -82,6 +82,16 @@ bool WinEDA_FindFrame::Create( wxWindow* parent, wxWindowID id, const wxString&
GetSizer()->SetSizeHints(this); GetSizer()->SetSizeHints(this);
Centre(); Centre();
////@end WinEDA_FindFrame creation ////@end WinEDA_FindFrame creation
m_NewTextCtrl->SetFocus();
/* does not work here, might work if moved elsewhere,
see void DrcDialog::OnInitDialog( wxInitDialogEvent& event )
// deselect the existing text, seems SetFocus() wants to emulate
// Microsoft and select all text, which is not desireable here.
m_NewTextCtrl->SetSelection(0,0);
*/
return true; return true;
} }
...@@ -90,9 +100,9 @@ bool WinEDA_FindFrame::Create( wxWindow* parent, wxWindowID id, const wxString& ...@@ -90,9 +100,9 @@ bool WinEDA_FindFrame::Create( wxWindow* parent, wxWindowID id, const wxString&
*/ */
void WinEDA_FindFrame::CreateControls() void WinEDA_FindFrame::CreateControls()
{ {
SetFont(*g_DialogFont); SetFont(*g_DialogFont);
////@begin WinEDA_FindFrame content construction ////@begin WinEDA_FindFrame content construction
// Generated by DialogBlocks, 03/03/2006 08:14:51 (unregistered) // Generated by DialogBlocks, 03/03/2006 08:14:51 (unregistered)
...@@ -185,7 +195,7 @@ wxIcon WinEDA_FindFrame::GetIconResource( const wxString& name ) ...@@ -185,7 +195,7 @@ wxIcon WinEDA_FindFrame::GetIconResource( const wxString& name )
void WinEDA_FindFrame::OnFindSheetClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindSheetClick( wxCommandEvent& event )
{ {
FindSchematicItem(event); FindSchematicItem(event);
} }
/*! /*!
...@@ -194,7 +204,7 @@ void WinEDA_FindFrame::OnFindSheetClick( wxCommandEvent& event ) ...@@ -194,7 +204,7 @@ void WinEDA_FindFrame::OnFindSheetClick( wxCommandEvent& event )
void WinEDA_FindFrame::OnFindHierarchyClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindHierarchyClick( wxCommandEvent& event )
{ {
FindSchematicItem(event); FindSchematicItem(event);
} }
/*! /*!
...@@ -203,7 +213,7 @@ void WinEDA_FindFrame::OnFindHierarchyClick( wxCommandEvent& event ) ...@@ -203,7 +213,7 @@ void WinEDA_FindFrame::OnFindHierarchyClick( wxCommandEvent& event )
void WinEDA_FindFrame::OnLocateInLibrariesClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnLocateInLibrariesClick( wxCommandEvent& event )
{ {
LocatePartInLibs(event); LocatePartInLibs(event);
} }
/*! /*!
...@@ -212,7 +222,7 @@ void WinEDA_FindFrame::OnLocateInLibrariesClick( wxCommandEvent& event ) ...@@ -212,7 +222,7 @@ void WinEDA_FindFrame::OnLocateInLibrariesClick( wxCommandEvent& event )
void WinEDA_FindFrame::OnFindNextMarkerClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindNextMarkerClick( wxCommandEvent& event )
{ {
FindMarker(event); FindMarker(event);
} }
...@@ -222,7 +232,7 @@ void WinEDA_FindFrame::OnFindNextMarkerClick( wxCommandEvent& event ) ...@@ -222,7 +232,7 @@ void WinEDA_FindFrame::OnFindNextMarkerClick( wxCommandEvent& event )
void WinEDA_FindFrame::OnFindMarkersClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindMarkersClick( wxCommandEvent& event )
{ {
FindMarker(event); FindMarker(event);
} }
...@@ -232,7 +242,7 @@ void WinEDA_FindFrame::OnFindMarkersClick( wxCommandEvent& event ) ...@@ -232,7 +242,7 @@ void WinEDA_FindFrame::OnFindMarkersClick( wxCommandEvent& event )
void WinEDA_FindFrame::OnFindNextClick( wxCommandEvent& event ) void WinEDA_FindFrame::OnFindNextClick( wxCommandEvent& event )
{ {
FindSchematicItem(event); FindSchematicItem(event);
} }
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