The question is how to correctly subclass the wx.grid.
In the past I used wx.grid.Grid as the super class. If you look
at a older version wxPython3 demo’s they use it to along with
other base classes i.e. PyGridTableBase. None of that applies
with wxPython4. I’d like to see a little more code than just
the wxPython 4 demo code - which is helpful but confusing. So
I’m hoping someone has used the new wxPython4 in a new project
and figured out many of the in’s and out’s of the new grid
code.
+1 I need to use wx.grid in my wxPython4 application and find it quite
confusing. I, too, want to better understand how to use it.
Rich
···
On Mon, 30 Apr 2018, john fabiani` wrote:
The question is how to correctly subclass the wx.grid. In the past I used
wx.grid.Grid as the super class. If you look at a older version wxPython3
demo's they use it to along with other base classes i.e. PyGridTableBase.
None of that applies with wxPython4. I'd like to see a little more code
than just the wxPython 4 demo code - which is helpful but confusing. So
I'm hoping someone has used the new wxPython4 in a new project and figured
out many of the in's and out's of the new grid code.
What is wrong with the GridHugeTable.py demo? It shows how to use GridTableBase in case you want or need virtual tables.
Just derive from wx.grid.Grid and wx.grid.GridTableBase instead of grid.PyGridTableBase.
For a grid which does not have a data table, but owns the data and formats, have a look at GridSimple.py
There were no fundamental changes between wxPython 3 and 4 except that you can derive directly instead of using Py... classes.
Regards,
Dietmar
···
On 4/30/2018 9:24 PM, john fabiani` wrote:
In the past I used wx.grid.Grid as the super class. If you look at a older version wxPython3 demo's they use it to along with other base classes i.e. PyGridTableBase. None of that applies with wxPython4. I'd like to see a little more code than just the wxPython 4 demo code - which is helpful but confusing. So I'm hoping someone has used the new wxPython4 in a new project and figured out many of the in's and out's of the new grid code.
I have not found that to be correct. It maybe
that I have created an error in my code and don’t see it but I
will give it the college try again before I post any code.
Johnf
···
On 04/30/2018 02:17 PM, Dietmar
Schwertberger wrote:
-- You received this message because you are subscribed to the Google
Groups “wxPython-users” group.
To unsubscribe from this group and stop receiving emails from it,
send an email to .
For more options, visit .
On 4/30/2018 9:24 PM, john fabiani`
wrote:
In the
past I used wx.grid.Grid as the super class. If you look at
a older version wxPython3 demo’s they use it to along with
other base classes i.e. PyGridTableBase. None of that
applies with wxPython4. I’d like to see a little more code
than just the wxPython 4 demo code - which is helpful but
confusing. So I’m hoping someone has used the new
wxPython4 in a new project and figured out many of the in’s
and out’s of the new grid code.
What is wrong with the GridHugeTable.py demo? It shows how to
use GridTableBase in case you want or need virtual tables.
Just derive from wx.grid.Grid and wx.grid.GridTableBase instead
of grid.PyGridTableBase.
For a grid which does not have a data table, but owns the data
and formats, have a look at GridSimple.py
There were no fundamental changes between wxPython 3 and 4
except that you can derive directly instead of using Py…
classes.
Do you get core dumps?
When I ported my code to one of the first Phoenix versions two years ago, I got some. They were related to GetAttr/GridCellAttr. Phonix was less tolerant here. Always be sure to keep a reference to your GridCellAttr instances and call attr.IncRef() before it gets returned by GetAttr.
Regards,
Dietmar
···
On 5/1/2018 12:02 AM, john fabiani` wrote:
I have not found that to be correct. It maybe that I have created an error in my code and don't see it but I will give it the college try again before I post any code.