[wx-dev] wxDataViewCtrl cell attributes
Vadim Zeitlin
vadim at wxwindows.org
Fri Jun 1 12:13:46 PDT 2007
On Fri, 01 Jun 2007 19:30:21 +0200 Robert Roebling wrote:
RR> > The only other MVC control using attributes in wx is
RR> > wxGrid AFAIK. And it actually combines the attributes
RR> > of the table
RR>
RR> Not sure what you mean here (what attributes of the
RR> table?)
wxGridTableBase has its own GetAttr(). By default it forwards to the
attribute provider but it could be overridden in a derived table (i.e.
model) class to return something else directly.
OTOH I was wrong about combining the attributes with the attributes of the
grid because there are no attributes in wxGrid itself, sorry.
RR> No need to suggest there, the problem with the idea of having
RR> the same renderer classes for both wxGrid and wxDataViewCtrl
RR> is that under GTK+, some of the renderes are just native GTK+
RR> renderers for the GtkTreeView whereas for wxGrid, all renderers
RR> are generic.
Surely the implementation shouldn't matter provided they derive from the
same wxItemRenderer (currently known as wxGridCellRenderer) ABC?
RR> One could probably still define a common renderer class and add an
RR> intermediate glue class between a generic renderer and the GTK+ native
RR> renderer, but my energy ended there.
I realize that it might be easier to just implement wxDataViewCtrl stuff
independently but it would be really, really a pity to not reuse wxGrid
API here.
Regards,
VZ
More information about the wx-dev
mailing list