]> git.saurik.com Git - wxWidgets.git/blobdiff - samples/combo/combo.cpp
avoid deprecated gdk_net_wm_supports()
[wxWidgets.git] / samples / combo / combo.cpp
index 145b15fc0fc37efcc0c1321ea0778b8017c91e17..2ed5167ad50667b194ec8e30aa207a5db6e846f5 100644 (file)
@@ -125,6 +125,7 @@ enum
 // 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)
@@ -376,6 +377,14 @@ public:
     virtual void Init()
     {
     }
+    virtual ~TreeCtrlComboPopup()
+    {
+        if (!m_isBeingDeleted)
+        {
+            wxMessageBox("error wxTreeCtrl::Destroy() was not called");
+        }
+        SendDestroyEvent();
+    }
 
     virtual bool Create( wxWindow* parent )
     {
@@ -615,7 +624,7 @@ MyFrame::MyFrame(const wxString& title)
 
     // 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."));
@@ -918,7 +927,7 @@ MyFrame::MyFrame(const wxString& title)
     panel->SetSizer( topSizer );
     topSizer->SetSizeHints( panel );
 
-    SetSize(740,400);
+    Fit();
     Centre();
 }
 
@@ -938,6 +947,11 @@ void MyFrame::OnComboBoxUpdate( wxCommandEvent& event )
     {
         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) )