On 02/06/2015 01:14 PM, Paul McNett wrote:
On 2/5/15 10:23 AM, john wrote:
Hi all,
makeGridEditor is a method in uiwx/__init__ - can anyone explain why
it's there? It appears that it is called from only uiwx/dGrid.py when
setting up the dGrid test. The way I understand to create a CellRederer
does not match the code in makeGridEditor. I not saying I know
everything about CellRederers but to be honest I don't understand it.
There is no method clone, or draw. I do not see where it inherits from
either PyGridCellRenderer or GridCellRenderer.
Does anyone use the makeGridEdior in their code? I ask because I'd like
to remove it.
Once very long ago I had this vision to make VFP-like grids where you
could populate them with dTextBoxes, dCheckboxes, dWhatevers, or your
own subclasses of them.
I wanted to implement this, and then take away keyword args to dColumn
that wouldn't be necessary anymore (data format, type, etc.) as well
as functionality that dGrid could now just delegate to the control
(getting/setting the Value, etc.).
makeGridEditor() got us 80% there. I tried a few times to get it into
dGrid but people complained about some problems that it caused (can't
remember now the specifics).
Alas, it's cruft now and so should be removed, unless people are
relying on it (in theory they could use it how I describe above for
their own classes).
Paul
Thanks for the info Paul. I left it in - but of course it does not
work. To be honest I too don't see the need - wxPython provides a very
rich set of cell renderers and for those few that need a special
renderer it's not to hard to create.
Beyond the above, I could not determine how it worked - for example in
the clone method you have '1/0' which of course will cause an error but
clone is never called which was a complete surprise. The inheritance
also work in some funny way that I did not understand. Of course it's
moot at this point unless someone wants to revisit at a later time.
Johnf
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/[email protected]