Sorry, premature send. Let me try again.
I believe the various Renderers are self documenting in a way, something
which I've discovered looking at docstrings.
For example, here is the first line in the docstring for
DataViewToggleRenderer.__init__:
__init__(self, String varianttype="bool", int mode=DATAVIEW_CELL_INERT,
int align=DVR_DEFAULT_ALIGNMENT) -> DataViewToggleRenderer"
Or how about DataViewIconTextRenderer.__init__:
__init__(self, String varianttype="wxDataViewIconText", int
mode=DATAVIEW_CELL_INERT,
int align=DVR_DEFAULT_ALIGNMENT) -> DataViewIconTextRenderer
The parameter list for each method lists a 'varienttype' and I believe that
is what you are supposed to return from GetColumnType().
···
-----Original Message----- From: Michael Hipp
Sent: Monday, February 27, 2012 2:28 PM
To: wxpython-users@googlegroups.com
Subject: Re: [wxPython-users] return from GetColumnType()
On 2012-02-27 1:14 PM, werner wrote:
On 27/02/2012 19:20, Michael Hipp wrote:
Can someone tell me what things are supposed to be returned by this method of
the model used by DataViewListCtrl:
virtual wxString wxDataViewModel::GetColumnType ( unsigned int col )
def GetColumnType(self, col):
mapper = { 0 : 'string',
1 : 'string',
2 : 'string',
3.: 'string', # the real value is an int, but the renderer should convert it okay
4 : 'datatime',
5 : 'bool',
}
This appears to be what I was looking for. Likely 'bool' is the correct
answer
for a 'Toggle' column.
Michael, have you used the ObjectListView in the past? If yes, I wonder how you
compare it to DVC?
I only played around with it. It appears to be based on the native MSW List
control which has some odd limitations so I've mostly stayed away.
Most all my work has been done using wx.grid which is a powerful tool but
you
have to do everything for it. I saw the new-ish DVC stuff in the 2.9.3 demo
and
thought it might be worth a try. So I have no basis to compare to OLV.
I'm still looking for my "dream" list/table/grid control with built-in
sorting,
row sizing, colorization, data model management, etc. Suggestions welcome.
Thanks,
Michael
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en
--
To unsubscribe, send email to wxPython-users+unsubscribe@googlegroups.com
or visit http://groups.google.com/group/wxPython-users?hl=en