50 m_control =
new wxComboBox( aParent, wxID_ANY, wxEmptyString,
51 wxDefaultPosition, wxDefaultSize,
m_names );
53 wxGridCellEditor::Create(aParent, aId, aEventHandler);
59 return Combo()->GetValue();
68#if defined( __WXMAC__ )
72 Combo()->SetSize( rect, wxSIZE_ALLOW_MINUS_ONE );
78 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
81 evtHandler->SetInSetFocus(
true );
87 m_value = aGrid->GetTable()->GetValue( aRow, aCol );
107#if !defined(__WXGTK__)
108 evtHandler->SetInSetFocus(
false );
115 const wxString value =
Combo()->GetValue();
131 aGrid->GetTable()->SetValue( aRow, aCol,
m_value );
142 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
146 evtHandler->SetInSetFocus(
false );
152 auto evtHandler =
static_cast<wxGridCellEditorEvtHandler*
>( m_control->GetEventHandler() );
157 wxFocusEvent event( wxEVT_KILL_FOCUS, m_control->GetId() );
158 event.SetEventObject( m_control );
159 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)
~GRID_CELL_COMBOBOX() override
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