]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datavcmn.cpp
Check that an error really occurred when getting wxChoice data in wxMSW.
[wxWidgets.git] / src / common / datavcmn.cpp
index febc1d1bf4674790497fdd257280e5e6e07ebe0c..6dcf50fb56e2e33c43cb2983081ba81b48c8edbb 100644 (file)
@@ -672,6 +672,8 @@ wxDataViewRendererBase::wxDataViewRendererBase( const wxString &varianttype,
 
 wxDataViewRendererBase::~wxDataViewRendererBase()
 {
+    if ( m_editorCtrl )
+        DestroyEditControl();
 }
 
 wxDataViewCtrl* wxDataViewRendererBase::GetView() const
@@ -820,6 +822,18 @@ bool wxDataViewCustomRendererBase::ActivateCell(const wxRect& cell,
         return Activate(cell, model, item, col);
 }
 
+void wxDataViewCustomRendererBase::RenderBackground(wxDC* dc, const wxRect& rect)
+{
+    if ( !m_attr.HasBackgroundColour() )
+        return;
+
+    const wxColour& colour = m_attr.GetBackgroundColour();
+    wxDCPenChanger changePen(*dc, colour);
+    wxDCBrushChanger changeBrush(*dc, colour);
+
+    dc->DrawRectangle(rect);
+}
+
 void
 wxDataViewCustomRendererBase::WXCallRender(wxRect rectCell, wxDC *dc, int state)
 {
@@ -1404,6 +1418,11 @@ wxDataViewCtrlBase::InsertColumn( unsigned int WXUNUSED(pos), wxDataViewColumn *
     return true;
 }
 
+void wxDataViewCtrlBase::StartEditor(const wxDataViewItem& item, unsigned int column)
+{
+    EditItem(item, GetColumn(column));
+}
+
 // ---------------------------------------------------------
 // wxDataViewEvent
 // ---------------------------------------------------------