> I'd recommend not using
> wxDataViewTreeCtrl at all, it's a pretty weird class which is supposed to
> be like wxTreeCtrl but actually isn't one.
For me it works much better than wxTreeCtrl because I do not have icons
in each level of my tree and levels without icons are ugly on Windows
with wxTreeCtrl (a free space is left and the dashed line is not continued).
So my question to you Vadim: is there any risk by adopting
wxDataViewTreeCtrl? When you say "I'd recommend not using
wxDataViewTreeCtrl", are you warning me from potential future issues I
would discover or if it does what I want, I am safe with it?
This being said, I would like to use the generic version of
wxDataViewTreeCtrl on all platforms because it behaves better when all
levels do not have icons: on GTK3, when I create the wxDataViewTreeCtrl
in collapsed state and the top item does not have an icon, the text is close
to the arrow, fine.
When I open the top item, as soon as an item with icon is shown, all items
save the space for an icon which looks bad when there is no icon to show.
This does not happen with the generic control on MSW and this is why I
would like ot use it everywhere.
How can I use the generic version of wxDataViewTreeCtrl on all platforms?
I tried to#include <wx/generic/dataview.h>
instead of #include <wx/dataview.h>
but got plenty of compilation errors like:
/softs/lin64-gcc-8.2.0/release/wx/include/wx-3.1/wx/generic/dataview.h:35:1:
error: expected class-name before ‘{’ token
{
^
/softs/lin64-gcc-8.2.0/release/wx/include/wx-3.1/wx/generic/dataview.h:38:22:
error: ‘wxDataViewRenderer’ has not been declared
wxDataViewRenderer *renderer,
^~~~~~~~~~~~~~~~~~
/softs/lin64-gcc-8.2.0/release/wx/include/wx-3.1/wx/generic/dataview.h:50:22:
error: ‘wxDataViewRenderer’ has not been declared
wxDataViewRenderer *renderer,
^~~~~~~~~~~~~~~~~~
/softs/lin64-gcc-8.2.0/release/wx/include/wx-3.1/wx/generic/dataview.h:61:18:
error: ‘virtual void wxDataViewColumn::SetTitle(const wxString&)’
marked ‘override’, but does not override
virtual void SetTitle(const wxString& title) wxOVERRIDE
^~~~~~~~
Kind regards,
F