Mystery: wx.grid, a filter function, and Unicode
Christian K.
ckkart at hoc.net
Thu Jan 3 07:04:11 PST 2008
Bob Klahn wrote:
> No, Marc, it's not possible. translate takes two arguments when used
> with plain strings, and one argument when used with Unicode strings.
>
> As I said, filters generated by makefilter work perfectly outside of my
> wxPython application.
wxPython unicode handles all strings as unicode internally. I can't tell
you exactly where the conversion takes place as you didn't show the
complete grid code. I guess that even if you handle all the underlying
data in your own TableBase class, you cannot avoid to receive unicode
strings from the gui when a value has been entered in a grid cell. You
could try to convert them to string in your own SetCellValue method.
Then the GridCellRenderer should pick up the string values.
Christian
More information about the wxpython-users
mailing list