51 m_control =
new wxComboBox( aParent, wxID_ANY, wxEmptyString,
52 wxDefaultPosition, wxDefaultSize,
m_names );
54 wxGridCellEditor::Create(aParent, aId, aEventHandler);
60 return Combo()->GetValue();
69#if defined( __WXMAC__ )
73 Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
79 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
82 evtHandler->SetInSetFocus(
true );
88 m_value = aGrid->GetTable()->GetValue( aRow, aCol );
108#if !defined(__WXGTK__)
109 evtHandler->SetInSetFocus(
false );
116 const wxString value =
Combo()->GetValue();
132 aGrid->GetTable()->SetValue( aRow, aCol,
m_value );
143 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
147 evtHandler->SetInSetFocus(
false );
153 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
158 wxFocusEvent event( wxEVT_KILL_FOCUS, m_control->GetId() );
159 event.SetEventObject( m_control );
160 evtHandler->ProcessEvent( event );
bool EndEdit(int aRow, int aCol, const wxGrid *, const wxString &, wxString *aNewVal) override
void onComboDropDown(wxCommandEvent &aEvent)
GRID_CELL_COMBOBOX(const wxArrayString &names)
void Create(wxWindow *aParent, wxWindowID aId, wxEvtHandler *aEventHandler) override
void onComboCloseUp(wxCommandEvent &aEvent)
wxString GetValue() const override
void BeginEdit(int aRow, int aCol, wxGrid *aGrid) override
wxComboBox * Combo() const
void SetSize(const wxRect &aRect) override
void ApplyEdit(int aRow, int aCol, wxGrid *aGrid) override
wxGridCellEditor * Clone() const override