At least in the generic version, the rectangle passed to the renderer has
the size of GetSize() only if that size is specified, so if you returned
wxDefaultSize from your overridden GetSize() you should receive the full
cell rectangle in your Render().
I'm less sure about the other version, but looking at the GTK and Cocoa
code, they don't seem to adjust the rectangle at all (which probably means
that we have a bug here as the behaviour is different from the generic
version...). But I could be missing something here, it would be nice if you
could test this.
I'm less sure about the other version, but looking at the GTK and Cocoa
code, they don't seem to adjust the rectangle at all (which probably means
that we have a bug here as the behaviour is different from the generic
version...). But I could be missing something here, it would be nice if you
could test this.
diff --git a/samples/dataview/dataview.cpp b/samples/dataview/dataview.cppindex fca7630..2d4d58d 100644--- a/samples/dataview/dataview.cpp+++ b/samples/dataview/dataview.cpp@@ -223,7 +223,9 @@ public: virtual wxSize GetSize() const wxOVERRIDE {- return wxSize(60,20);+ int width = GetOwner()->GetWidth();+ wxPrintf ("Column width is %d\n", width);+ return wxSize(60,width / 3); } virtual bool SetValue( const wxVariant &value ) wxOVERRIDE@@ -598,7 +600,7 @@ void MyFrame::BuildDataViewCtrl(wxPanel* parent, unsigned int nPanel, unsigned l wxASSERT(!m_ctrl[0] && !m_music_model); m_ctrl[0] = new wxDataViewCtrl( parent, ID_MUSIC_CTRL, wxDefaultPosition,- wxDefaultSize, style );+ wxDefaultSize, style | wxDV_VARIABLE_LINE_HEIGHT); m_ctrl[0]->Connect(wxEVT_CHAR, wxKeyEventHandler(MyFrame::OnDataViewChar), NULL, this);Can you check what happen with GTK+3?
Also which version of GTK+2 did you test this on?
Any clues on how to build the generic version of wxDataViewCtrl on Linux - I would like to test that as well.
#define wxHAS_GENERIC_DATAVIEWCTRL 1
This is quite impossible. The MSW version *is* the generic one, there is
no native version under MSW. There is a native GTK version however.