51 m_control =
new wxComboBox( aParent, wxID_ANY, wxEmptyString,
52 wxDefaultPosition, wxDefaultSize,
m_names );
54 wxGridCellEditor::Create(aParent, aId, aEventHandler);
59 return Combo()->GetValue();
67#if defined( __WXMAC__ )
71 Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
77 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
80 evtHandler->SetInSetFocus(
true );
86 m_value = aGrid->GetTable()->GetValue( aRow, aCol );
106#if !defined(__WXGTK__)
107 evtHandler->SetInSetFocus(
false );
114 const wxString value =
Combo()->GetValue();
130 aGrid->GetTable()->SetValue( aRow, aCol,
m_value );
141 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
145 evtHandler->SetInSetFocus(
false );
151 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
156 wxFocusEvent event( wxEVT_KILL_FOCUS, m_control->GetId() );
157 event.SetEventObject( m_control );
158 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