]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/datavcmn.cpp
Use best controller size in wxBookCtrl best size calculation.
[wxWidgets.git] / src / common / datavcmn.cpp
index febc1d1bf4674790497fdd257280e5e6e07ebe0c..ae7dcd404327a6c6b74fbe7081f0b4948eb2c0c5 100644 (file)
@@ -672,6 +672,8 @@ wxDataViewRendererBase::wxDataViewRendererBase( const wxString &varianttype,
 
 wxDataViewRendererBase::~wxDataViewRendererBase()
 {
 
 wxDataViewRendererBase::~wxDataViewRendererBase()
 {
+    if ( m_editorCtrl )
+        DestroyEditControl();
 }
 
 wxDataViewCtrl* wxDataViewRendererBase::GetView() const
 }
 
 wxDataViewCtrl* wxDataViewRendererBase::GetView() const
@@ -820,6 +822,18 @@ bool wxDataViewCustomRendererBase::ActivateCell(const wxRect& cell,
         return Activate(cell, model, item, col);
 }
 
         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)
 {
 void
 wxDataViewCustomRendererBase::WXCallRender(wxRect rectCell, wxDC *dc, int state)
 {