// the application icon (under Windows and OS/2 it is in resources and even
// though we could still include the XPM here it would be unused)
-#if !defined(__WXMSW__) && !defined(__WXPM__)
+#ifndef wxHAS_IMAGES_IN_RESOURCES
#include "../sample.xpm"
#endif
// simple menu events like this the static method is much simpler.
BEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_TEXT(wxID_ANY,MyFrame::OnComboBoxUpdate)
+ EVT_TEXT_ENTER(wxID_ANY,MyFrame::OnComboBoxUpdate)
EVT_COMBOBOX(wxID_ANY,MyFrame::OnComboBoxUpdate)
EVT_MENU(ComboCtrl_Compare, MyFrame::OnShowComparison)
virtual void Init()
{
}
+ virtual ~TreeCtrlComboPopup()
+ {
+ if (!m_isBeingDeleted)
+ {
+ wxMessageBox("error wxTreeCtrl::Destroy() was not called");
+ }
+ SendDestroyEvent();
+ }
virtual bool Create( wxWindow* parent )
{
// the "About" item should be in the help menu
wxMenu *helpMenu = new wxMenu;
- helpMenu->Append(ComboCtrl_About, wxT("&About...\tF1"), wxT("Show about dialog"));
+ helpMenu->Append(ComboCtrl_About, wxT("&About\tF1"), wxT("Show about dialog"));
fileMenu->Append(ComboCtrl_Compare, wxT("&Compare against wxComboBox..."),
wxT("Show some wxOwnerDrawnComboBoxes side-by-side with native wxComboBoxes."));
rowSizer = new wxBoxSizer( wxHORIZONTAL );
cc = new wxComboCtrlWithCustomPopupAnim();
+
+ // Let's set a custom style for the contained wxTextCtrl. We need to
+ // use two-step creation for it to work properly.
+ cc->SetTextCtrlStyle(wxTE_RIGHT);
+
cc->Create(panel, wxID_ANY, wxEmptyString);
// Make sure we use popup that allows focusing the listview.
panel->SetSizer( topSizer );
topSizer->SetSizeHints( panel );
- SetSize(740,400);
+ Fit();
Centre();
}
{
wxLogDebug(wxT("EVT_TEXT(id=%i,string=\"%s\")"),event.GetId(),event.GetString().c_str());
}
+ else if ( event.GetEventType() == wxEVT_COMMAND_TEXT_ENTER )
+ {
+ wxLogDebug("EVT_TEXT_ENTER(id=%i,string=\"%s\")",
+ event.GetId(), event.GetString().c_str());
+ }
}
void MyFrame::OnShowComparison( wxCommandEvent& WXUNUSED(event) )