I have an issue with wxListCtrl that I'm finding difficult to explain
well and / or troubleshoot. I've subclassed ListCtrl to create a
Virtual List. Instances of the list are associated with Data Sources
which retrieve data from a Firebird Database. I have two of these
pairs already functioning in my application.
In a third instance of my list, the column at index 1 selectively
refuses to display the values for all items. It appears to be related
to the value of the Column Header, though I realize that probably
isn't actually quite right as far as an explanation is concerned.
For example, if the list that represents the Column Headers for the
third instance of my Virtual List is ['Device Id', 'Path',
'Credentials', 'Type', 'Status', 'Max Use'] then the Path column is
blank for all rows. If I remove the 'Device Id' column, Path, which
now resides at column 0, is populated properly for all rows.
Credentials, which now resides at Column 1, is blank for all rows.
Credentials displayed properly when it resided at Column 2, and will
display properly at Column 0. From the list of available columns
above Path, Credentials, and Status refuse to display in Column 1.
They display properly in any other column. My OnGetItemText is
defined like so:
def OnGetItemText(self, item, col):
return self.datasource.GetItem(item, self.columns[col])
The GetItem method for the datasource is:
def GetItem(self, item, field):
return self.data[self._keys[item]][field]
In the datasource, data is an Ordered Dictionary of Dictionaries and
_keys is a cached copy of data.keys(). If I add print statements to
OnGetItemText and attempt to print the value that would return it
displays properly on my console. I'm (reasonably) confident that my
Virtual List and Datasource classes work like they should as witnessed
by the other working instances in my application.
Any help or direction would be much appreciated. Thanks,
--Dan