wxTextCtrl *TextCtrl() const { return m_pTextCtrl; }
private:
+ // use standard ids for our commands!
enum
{
- Menu_Close = 100,
- Menu_Save,
- Menu_Clear
+ Menu_Close = wxID_CLOSE,
+ Menu_Save = wxID_SAVE,
+ Menu_Clear = wxID_CLEAR
};
// instead of closing just hide the window to be able to Show() it later
// we can't just disable the control because this looks ugly under Windows
// (wrong bg colour, no scrolling...), but we still want to disable
// selecting items - it makes no sense here
- m_listctrl->SetItemState(event.GetItem(), 0, wxLIST_STATE_SELECTED);
+ m_listctrl->SetItemState(event.GetIndex(), 0, wxLIST_STATE_SELECTED);
}
void wxLogDialog::OnOk(wxCommandEvent& WXUNUSED(event))