I've looked at the demo and I see GRID_VALUE_..., but how do I make a
custom value, of say, GRID_VALUE_DATE or GRID_VALUE_MONEY, so that I
can then apply all my formatting, saving, loading, to the data type
and ideally make my life much easier.
To be fair, I haven't looked around THAT much into how this could be
done, but I figured it would be easier to ask rather than to save
myself days of searching.
Hello,
I've looked at the demo and I see GRID_VALUE_..., but how do I make a
custom value, of say, GRID_VALUE_DATE or GRID_VALUE_MONEY, so that I
can then apply all my formatting, saving, loading, to the data type
and ideally make my life much easier.
To be fair, I haven't looked around THAT much into how this could be
done, but I figured it would be easier to ask rather than to save
myself days of searching.
Thank you,
Eve
I've looked at the demo and I see GRID_VALUE_..., but how do I make a
custom value, of say, GRID_VALUE_DATE or GRID_VALUE_MONEY, so that I
can then apply all my formatting, saving, loading, to the data type
and ideally make my life much easier.
To be fair, I haven't looked around THAT much into how this could be
done, but I figured it would be easier to ask rather than to save
myself days of searching.
You can use RegisterDataType, which takes a name for the type, and also the renderer and editor that should be used for that type.
Well, I managed to get RegisterDataType working, along with the
rendering/editting for those cells, and it worked like a charm.
However, it seems that once I added those, the default drawing for the
rest of the grid stopped and it isn't until I select the cell that it
appears (otherwise, whatever was behind the app. at time of
initialization shows instead.)
I figure I messed up the code somehow and probably not calling
something I should, or have something in the wrong place. I've
compared it to the samples but haven't been able to find anything
remarkably different as well as spent some time experimenting with
moving stuff around.
There is no way to attach files in the Google Groups web interface,
but you CAN attach files by sending them by email (I think): wxPython-
users@googlegroups.com
- Mike
···
On Jun 24, 12:52 pm, natchela <natch...@gmail.com> wrote:
Well, I managed to get RegisterDataType working, along with the
rendering/editting for those cells, and it worked like a charm.
However, it seems that once I added those, the default drawing for the
rest of the grid stopped and it isn't until I select the cell that it
appears (otherwise, whatever was behind the app. at time of
initialization shows instead.)
I figure I messed up the code somehow and probably not calling
something I should, or have something in the wrong place. I've
compared it to the samples but haven't been able to find anything
remarkably different as well as spent some time experimenting with
moving stuff around.
There is no way to attach files in the Google Groups web interface,
but you CAN attach files by sending them by email (I think): wxPython-
users@googlegroups.com
Well, I managed to get RegisterDataType working, along with the
rendering/editting for those cells, and it worked like a charm.
However, it seems that once I added those, the default drawing for the
rest of the grid stopped and it isn't until I select the cell that it
appears (otherwise, whatever was behind the app. at time of
initialization shows instead.)
I figure I messed up the code somehow and probably not calling
something I should, or have something in the wrong place. I've
compared it to the samples but haven't been able to find anything
remarkably different as well as spent some time experimenting with
moving stuff around.
Sample made and sent (and still broken). Know in advance that I appreciate your time on this.
Since you are setting a clipping region you need to get rid of it when done, otherwise any further drawing on the same DC will be clipped to the same region. Call dc.DestroyClippingRegion()