diff --git a/common/drawframe.cpp b/common/drawframe.cpp index b9209442f2..6fc3cbbb53 100644 --- a/common/drawframe.cpp +++ b/common/drawframe.cpp @@ -360,7 +360,7 @@ void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event ) if( m_SelZoomBox == NULL ) return; // Should not happen! - int id = m_SelZoomBox->GetChoice(); + int id = m_SelZoomBox->GetCurrentSelection(); if( id < 0 || !( id < (int)m_SelZoomBox->GetCount() ) ) return; diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index 074e5bb33b..72aa395f00 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -101,8 +101,8 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_TOOL( CreateNewLibAndSavePartId, LIB_EDIT_FRAME::OnExportPart ) EVT_TOOL( ImportPartId, LIB_EDIT_FRAME::OnImportPart ) - EVT_KICAD_CHOICEBOX( ID_LIBEDIT_SELECT_PART_NUMBER, LIB_EDIT_FRAME::OnSelectPart ) - EVT_KICAD_CHOICEBOX( ID_LIBEDIT_SELECT_ALIAS, LIB_EDIT_FRAME::OnSelectAlias ) + EVT_COMBOBOX( ID_LIBEDIT_SELECT_PART_NUMBER, LIB_EDIT_FRAME::OnSelectPart ) + EVT_COMBOBOX( ID_LIBEDIT_SELECT_ALIAS, LIB_EDIT_FRAME::OnSelectAlias ) /* Right vertical toolbar. */ EVT_TOOL( ID_NO_TOOL_SELECTED, LIB_EDIT_FRAME::OnSelectTool ) diff --git a/eeschema/libeditframe.h b/eeschema/libeditframe.h index ca797f99ed..782ebf581a 100644 --- a/eeschema/libeditframe.h +++ b/eeschema/libeditframe.h @@ -28,8 +28,8 @@ class LIB_EDIT_FRAME : public EDA_DRAW_FRAME LIB_COMPONENT* m_tempCopyComponent; ///< Temporary copy of current component during edit. public: - WinEDAChoiceBox* m_SelpartBox; // a Box to select a part to edit (if any) - WinEDAChoiceBox* m_SelAliasBox; // a box to select the alias to edit (if any) + wxComboBox* m_SelpartBox; // a Box to select a part to edit (if any) + wxComboBox* m_SelAliasBox; // a box to select the alias to edit (if any) public: LIB_EDIT_FRAME( SCH_EDIT_FRAME* aParent, const wxString& title, diff --git a/eeschema/tool_lib.cpp b/eeschema/tool_lib.cpp index 4f73e428ae..c047dd8963 100644 --- a/eeschema/tool_lib.cpp +++ b/eeschema/tool_lib.cpp @@ -158,14 +158,20 @@ void LIB_EDIT_FRAME::ReCreateHToolbar() _( "Edit document file" ) ); m_HToolBar->AddSeparator(); - m_SelpartBox = new WinEDAChoiceBox( m_HToolBar, - ID_LIBEDIT_SELECT_PART_NUMBER, - wxDefaultPosition, - wxSize( LISTBOX_WIDTH, -1 ) ); + m_SelpartBox = new wxComboBox( m_HToolBar, + ID_LIBEDIT_SELECT_PART_NUMBER, + wxEmptyString, + wxDefaultPosition, + wxSize( LISTBOX_WIDTH, -1 ), + 0, NULL, wxCB_READONLY ); m_HToolBar->AddControl( m_SelpartBox ); - m_SelAliasBox = new WinEDAChoiceBox( m_HToolBar, ID_LIBEDIT_SELECT_ALIAS, wxDefaultPosition, - wxSize( LISTBOX_WIDTH, -1 ) ); + m_SelAliasBox = new wxComboBox( m_HToolBar, + ID_LIBEDIT_SELECT_ALIAS, + wxEmptyString, + wxDefaultPosition, + wxSize( LISTBOX_WIDTH, -1 ), + 0, NULL, wxCB_READONLY ); m_HToolBar->AddControl( m_SelAliasBox ); m_HToolBar->AddSeparator(); diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index e229d7fda7..3e7f41db1f 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -82,9 +82,9 @@ void LIB_VIEW_FRAME::ReCreateHToolbar() m_HToolBar->AddSeparator(); - SelpartBox = - new WinEDAChoiceBox( m_HToolBar, ID_LIBVIEW_SELECT_PART_NUMBER, - wxDefaultPosition, wxSize( 150, -1 ) ); + SelpartBox = new wxComboBox( m_HToolBar, ID_LIBVIEW_SELECT_PART_NUMBER, + wxEmptyString, wxDefaultPosition, + wxSize( 150, -1 ), 0, NULL, wxCB_READONLY ); m_HToolBar->AddControl( SelpartBox ); m_HToolBar->AddSeparator(); diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index 54d2e8dcc7..062fe39806 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -48,10 +48,8 @@ BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME ) EVT_TOOL_RANGE( ID_LIBVIEW_NEXT, ID_LIBVIEW_DE_MORGAN_CONVERT_BUTT, LIB_VIEW_FRAME::Process_Special_Functions ) - EVT_TOOL( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, - LIB_VIEW_FRAME::ExportToSchematicLibraryPart ) - EVT_KICAD_CHOICEBOX( ID_LIBVIEW_SELECT_PART_NUMBER, - LIB_VIEW_FRAME::Process_Special_Functions ) + EVT_TOOL( ID_LIBVIEW_CMP_EXPORT_TO_SCHEMATIC, LIB_VIEW_FRAME::ExportToSchematicLibraryPart ) + EVT_COMBOBOX( ID_LIBVIEW_SELECT_PART_NUMBER, LIB_VIEW_FRAME::Process_Special_Functions ) /* listbox events */ EVT_LISTBOX( ID_LIBVIEW_LIB_LIST, LIB_VIEW_FRAME::ClickOnLibList ) diff --git a/eeschema/viewlib_frame.h b/eeschema/viewlib_frame.h index 0df8f72915..91aa9c5413 100644 --- a/eeschema/viewlib_frame.h +++ b/eeschema/viewlib_frame.h @@ -10,7 +10,6 @@ class wxSashLayoutWindow; class wxListBox; class wxSemaphore; -class WinEDAChoiceBox; class SCH_SCREEN; class CMP_LIBRARY; @@ -21,7 +20,7 @@ class CMP_LIBRARY; class LIB_VIEW_FRAME : public EDA_DRAW_FRAME { private: - WinEDAChoiceBox* SelpartBox; + wxComboBox* SelpartBox; // List of libraries (for selection ) wxSashLayoutWindow* m_LibListWindow; diff --git a/eeschema/viewlibs.cpp b/eeschema/viewlibs.cpp index 3c423c2a4a..cd68336aa8 100644 --- a/eeschema/viewlibs.cpp +++ b/eeschema/viewlibs.cpp @@ -72,7 +72,7 @@ void LIB_VIEW_FRAME::Process_Special_Functions( wxCommandEvent& event ) break; case ID_LIBVIEW_SELECT_PART_NUMBER: - ii = SelpartBox->GetChoice(); + ii = SelpartBox->GetCurrentSelection(); if( ii < 0 ) return; m_unit = ii + 1; diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index fa8910fe30..7d912792f5 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -68,8 +68,8 @@ EVT_TOOL( wxID_COPY, GERBVIEW_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_PASTE, GERBVIEW_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_PRINT, GERBVIEW_FRAME::ToPrinter ) -EVT_KICAD_CHOICEBOX( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, - GERBVIEW_FRAME::OnSelectActiveLayer ) +EVT_COMBOBOX( ID_TOOLBARH_GERBVIEW_SELECT_ACTIVE_LAYER, + GERBVIEW_FRAME::OnSelectActiveLayer ) EVT_SELECT_DCODE( ID_TOOLBARH_GERBER_SELECT_ACTIVE_DCODE, GERBVIEW_FRAME::OnSelectActiveDCode ) diff --git a/include/dialog_helpers.h b/include/dialog_helpers.h index 66f66dd1a9..a9892aca71 100644 --- a/include/dialog_helpers.h +++ b/include/dialog_helpers.h @@ -211,44 +211,5 @@ public: } }; -/*************************/ -/* class WinEDAChoiceBox */ -/*************************/ - -/* class to display a choice list. - * This is a wrapper to wxComboBox (or wxChoice) - * but because they have some problems, WinEDAChoiceBox uses workarounds: - * - in wxGTK 2.6.2 wxGetSelection() does not work properly, - * - and wxChoice crashes if compiled in non unicode mode and uses utf8 codes - */ - -#define EVT_KICAD_CHOICEBOX EVT_COMBOBOX -class WinEDAChoiceBox : public wxComboBox -{ -public: - WinEDAChoiceBox( wxWindow* parent, wxWindowID id, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - int n = 0, const wxString choices[] = NULL ) : - wxComboBox( parent, id, wxEmptyString, pos, size, - n, choices, wxCB_READONLY ) - { - } - - - WinEDAChoiceBox( wxWindow* parent, wxWindowID id, - const wxPoint& pos, const wxSize& size, - const wxArrayString& choices ) : - wxComboBox( parent, id, wxEmptyString, pos, size, - choices, wxCB_READONLY ) - { - } - - - int GetChoice() - { - return GetCurrentSelection(); - } -}; #endif diff --git a/include/wxEeschemaStruct.h b/include/wxEeschemaStruct.h index 53b9cc4fbd..bcc2088dc4 100644 --- a/include/wxEeschemaStruct.h +++ b/include/wxEeschemaStruct.h @@ -58,7 +58,7 @@ enum fl_rot_cmp { class SCH_EDIT_FRAME : public EDA_DRAW_FRAME { public: - WinEDAChoiceBox* m_SelPartBox; + wxComboBox* m_SelPartBox; SCH_SHEET_PATH* m_CurrentSheet; ///< which sheet we are presently working on. int m_Multiflag; int m_NetlistFormat; diff --git a/include/wxPcbStruct.h b/include/wxPcbStruct.h index dbe9b4c41b..ed2c80a8ab 100644 --- a/include/wxPcbStruct.h +++ b/include/wxPcbStruct.h @@ -112,12 +112,9 @@ protected: virtual void unitsChangeRefresh(); public: - LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and - // select active layer - WinEDAChoiceBox* m_SelTrackWidthBox; // a combo box to display and - // select current track width - WinEDAChoiceBox* m_SelViaSizeBox; // a combo box to display and - // select current via diameter + LAYER_BOX_SELECTOR* m_SelLayerBox; // a combo box to display and select active layer + wxComboBox* m_SelTrackWidthBox; // a combo box to display and select current track width + wxComboBox* m_SelViaSizeBox; // a combo box to display and select current via diameter bool m_show_microwave_tools; bool m_show_layer_manager_tools; diff --git a/include/wxstruct.h b/include/wxstruct.h index 0c17ab9413..1e544d5550 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -39,7 +39,6 @@ class EDA_DRAW_PANEL; class EDA_MSG_PANEL; class BASE_SCREEN; class EDA_TOOLBAR; -class WinEDAChoiceBox; class PARAM_CFG_BASE; class Ki_PageDescr; class Ki_HotkeyInfo; @@ -245,10 +244,8 @@ public: EDA_TOOLBAR* m_OptionsToolBar; // Options Toolbar (left side) EDA_TOOLBAR* m_AuxiliaryToolBar; // Auxiliary Toolbar used in pcbnew - WinEDAChoiceBox* m_SelGridBox; // Choice box to choose the grid - // size - WinEDAChoiceBox* m_SelZoomBox; // Choice box to choose the zoom - // value + wxComboBox* m_SelGridBox; // Choice box to choose the grid size + wxComboBox* m_SelZoomBox; // Choice box to choose the zoom value int m_CursorShape; // shape for cursor (0 = default // cursor) diff --git a/pcbnew/dimension.cpp b/pcbnew/dimension.cpp index af5ebd0da0..e4dd3b19c1 100644 --- a/pcbnew/dimension.cpp +++ b/pcbnew/dimension.cpp @@ -49,7 +49,7 @@ private: WinEDA_SizeCtrl* m_TxtSizeCtrl; WinEDA_ValueCtrl* m_TxtWidthCtrl; wxRadioBox* m_Mirror; - WinEDAChoiceBox* m_SelLayerBox; + wxComboBox* m_SelLayerBox; public: @@ -122,8 +122,9 @@ DIMENSION_EDITOR_DIALOG::DIMENSION_EDITOR_DIALOG( PCB_EDIT_FRAME* parent, wxStaticText* text = new wxStaticText( this, -1, _( "Layer:" ) ); LeftBoxSizer->Add( text, 0, wxGROW | wxLEFT | wxRIGHT | wxTOP, 5 ); - m_SelLayerBox = new WinEDAChoiceBox( this, wxID_ANY, - wxDefaultPosition, wxDefaultSize ); + m_SelLayerBox = new wxComboBox( this, wxID_ANY, wxEmptyString, + wxDefaultPosition, wxDefaultSize, + 0, NULL, wxCB_READONLY ); LeftBoxSizer->Add( m_SelLayerBox, 0, wxGROW | wxLEFT | wxRIGHT | wxBOTTOM, 5 ); for( int layer = FIRST_NO_COPPER_LAYER; layerm_Text->m_Mirror = ( m_Mirror->GetSelection() == 1 ) ? true : false; - CurrentDimension->SetLayer( m_SelLayerBox->GetChoice() + FIRST_NO_COPPER_LAYER ); + CurrentDimension->SetLayer( m_SelLayerBox->GetCurrentSelection() + FIRST_NO_COPPER_LAYER ); CurrentDimension->AdjustDimensionDetails( true ); diff --git a/pcbnew/event_handlers_tracks_vias_sizes.cpp b/pcbnew/event_handlers_tracks_vias_sizes.cpp index 96117343a5..74e143f028 100644 --- a/pcbnew/event_handlers_tracks_vias_sizes.cpp +++ b/pcbnew/event_handlers_tracks_vias_sizes.cpp @@ -78,12 +78,12 @@ void PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event( wxCommandEvent& event ) break; case ID_AUX_TOOLBAR_PCB_TRACK_WIDTH: - ii = m_SelTrackWidthBox->GetChoice(); + ii = m_SelTrackWidthBox->GetCurrentSelection(); GetBoard()->m_TrackWidthSelector = ii; break; case ID_AUX_TOOLBAR_PCB_VIA_SIZE: - ii = m_SelViaSizeBox->GetChoice(); + ii = m_SelViaSizeBox->GetCurrentSelection(); GetBoard()->m_ViaSizeSelector = ii; break; diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index 54c0173222..f1a8e3fa9c 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -36,8 +36,8 @@ BEGIN_EVENT_TABLE( WinEDA_ModuleEditFrame, PCB_BASE_FRAME ) EVT_SIZE( WinEDA_ModuleEditFrame::OnSize ) - EVT_KICAD_CHOICEBOX( ID_ON_ZOOM_SELECT, WinEDA_ModuleEditFrame::OnSelectZoom ) - EVT_KICAD_CHOICEBOX( ID_ON_GRID_SELECT, WinEDA_ModuleEditFrame::OnSelectGrid ) + EVT_COMBOBOX( ID_ON_ZOOM_SELECT, WinEDA_ModuleEditFrame::OnSelectZoom ) + EVT_COMBOBOX( ID_ON_GRID_SELECT, WinEDA_ModuleEditFrame::OnSelectGrid ) EVT_TOOL( ID_MODEDIT_SELECT_CURRENT_LIB, WinEDA_ModuleEditFrame::Process_Special_Functions ) EVT_TOOL( ID_MODEDIT_SAVE_LIBMODULE, WinEDA_ModuleEditFrame::Process_Special_Functions ) diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 5ecf90b2e4..df42e257f7 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -68,8 +68,8 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_SOCKET( ID_EDA_SOCKET_EVENT_SERV, PCB_EDIT_FRAME::OnSockRequestServer ) EVT_SOCKET( ID_EDA_SOCKET_EVENT, PCB_EDIT_FRAME::OnSockRequest ) - EVT_KICAD_CHOICEBOX( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom ) - EVT_KICAD_CHOICEBOX( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid ) + EVT_COMBOBOX( ID_ON_ZOOM_SELECT, PCB_EDIT_FRAME::OnSelectZoom ) + EVT_COMBOBOX( ID_ON_GRID_SELECT, PCB_EDIT_FRAME::OnSelectGrid ) EVT_CLOSE( PCB_EDIT_FRAME::OnCloseWindow ) EVT_SIZE( PCB_EDIT_FRAME::OnSize ) @@ -164,10 +164,9 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) EVT_TOOL( ID_DRC_CONTROL, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, PCB_EDIT_FRAME::Process_Special_Functions ) EVT_TOOL( ID_AUX_TOOLBAR_PCB_SELECT_AUTO_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) - EVT_KICAD_CHOICEBOX( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::Process_Special_Functions ) - EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, - PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) - EVT_KICAD_CHOICEBOX( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) + EVT_COMBOBOX( ID_TOOLBARH_PCB_SELECT_LAYER, PCB_EDIT_FRAME::Process_Special_Functions ) + EVT_COMBOBOX( ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) + EVT_COMBOBOX( ID_AUX_TOOLBAR_PCB_VIA_SIZE, PCB_EDIT_FRAME::Tracks_and_Vias_Size_Event ) EVT_TOOL( ID_TOOLBARH_PCB_MODE_MODULE, PCB_EDIT_FRAME::AutoPlace ) EVT_TOOL( ID_TOOLBARH_PCB_MODE_TRACKS, PCB_EDIT_FRAME::AutoPlace ) EVT_TOOL( ID_TOOLBARH_PCB_FREEROUTE_ACCESS, PCB_EDIT_FRAME::Access_to_External_Tool ) diff --git a/pcbnew/tool_modedit.cpp b/pcbnew/tool_modedit.cpp index d54027f173..7daf63a8e5 100644 --- a/pcbnew/tool_modedit.cpp +++ b/pcbnew/tool_modedit.cpp @@ -219,18 +219,22 @@ void WinEDA_ModuleEditFrame::ReCreateAuxiliaryToolbar() m_AuxiliaryToolBar->AddSeparator(); // Grid selection choice box. - m_SelGridBox = new WinEDAChoiceBox( m_AuxiliaryToolBar, - ID_ON_GRID_SELECT, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ) ); + m_SelGridBox = new wxComboBox( m_AuxiliaryToolBar, + ID_ON_GRID_SELECT, + wxEmptyString, + wxPoint( -1, -1 ), + wxSize( LISTBOX_WIDTH, -1 ), + 0, NULL, wxCB_READONLY ); m_AuxiliaryToolBar->AddControl( m_SelGridBox ); // Zoom selection choice box. m_AuxiliaryToolBar->AddSeparator(); - m_SelZoomBox = new WinEDAChoiceBox( m_AuxiliaryToolBar, - ID_ON_ZOOM_SELECT, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ) ); + m_SelZoomBox = new wxComboBox( m_AuxiliaryToolBar, + ID_ON_ZOOM_SELECT, + wxEmptyString, + wxPoint( -1, -1 ), + wxSize( LISTBOX_WIDTH, -1 ), + 0, NULL, wxCB_READONLY ); m_AuxiliaryToolBar->AddControl( m_SelZoomBox ); // Update tool bar to reflect setting. diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index d6f08a518f..cba9b165a7 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -509,18 +509,22 @@ void PCB_EDIT_FRAME::ReCreateAuxiliaryToolbar() /* Set up toolbar items */ // Creates box to display and choose tracks widths: - m_SelTrackWidthBox = new WinEDAChoiceBox( m_AuxiliaryToolBar, - ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ) ); + m_SelTrackWidthBox = new wxComboBox( m_AuxiliaryToolBar, + ID_AUX_TOOLBAR_PCB_TRACK_WIDTH, + wxEmptyString, + wxPoint( -1, -1 ), + wxSize( LISTBOX_WIDTH, -1 ), + 0, NULL, wxCB_READONLY ); m_AuxiliaryToolBar->AddControl( m_SelTrackWidthBox ); m_AuxiliaryToolBar->AddSeparator(); // Creates box to display and choose vias diameters: - m_SelViaSizeBox = new WinEDAChoiceBox( m_AuxiliaryToolBar, - ID_AUX_TOOLBAR_PCB_VIA_SIZE, - wxPoint( -1, -1 ), - wxSize( (LISTBOX_WIDTH*12)/10, -1 ) ); + m_SelViaSizeBox = new wxComboBox( m_AuxiliaryToolBar, + ID_AUX_TOOLBAR_PCB_VIA_SIZE, + wxEmptyString, + wxPoint( -1, -1 ), + wxSize( (LISTBOX_WIDTH*12)/10, -1 ), + 0, NULL, wxCB_READONLY ); m_AuxiliaryToolBar->AddControl( m_SelViaSizeBox ); m_AuxiliaryToolBar->AddSeparator(); @@ -534,18 +538,22 @@ an existing track use its width\notherwise, use current width setting" ), // Add the box to display and select the current grid size: m_AuxiliaryToolBar->AddSeparator(); - m_SelGridBox = new WinEDAChoiceBox( m_AuxiliaryToolBar, - ID_ON_GRID_SELECT, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ) ); + m_SelGridBox = new wxComboBox( m_AuxiliaryToolBar, + ID_ON_GRID_SELECT, + wxEmptyString, + wxPoint( -1, -1 ), + wxSize( LISTBOX_WIDTH, -1 ), + 0, NULL, wxCB_READONLY ); m_AuxiliaryToolBar->AddControl( m_SelGridBox ); // Add the box to display and select the current Zoom m_AuxiliaryToolBar->AddSeparator(); - m_SelZoomBox = new WinEDAChoiceBox( m_AuxiliaryToolBar, - ID_ON_ZOOM_SELECT, - wxPoint( -1, -1 ), - wxSize( LISTBOX_WIDTH, -1 ) ); + m_SelZoomBox = new wxComboBox( m_AuxiliaryToolBar, + ID_ON_ZOOM_SELECT, + wxEmptyString, + wxPoint( -1, -1 ), + wxSize( LISTBOX_WIDTH, -1 ), + 0, NULL, wxCB_READONLY ); m_AuxiliaryToolBar->AddControl( m_SelZoomBox ); updateZoomSelectBox();