Opened 9 months ago

Closed 9 months ago

Last modified 9 months ago

#18348 closed defect (invalid)

wxDataViewRenderer derived classes data members are declared private!

Reported by: tomay3000 Owned by:
Priority: normal Milestone:
Component: GUI-all Version: 3.1.2
Keywords: wxDataViewRenderer Cc:
Blocked By: Blocking:
Patch: no

Description

Most of wxDataViewRenderer derived classes are declared private where they should be protected.

I needed to customize wxDataViewDateRenderer to make display the full date and time, where I found that m_date is private.

The same thing applies to wxDataViewTextRenderer for m_markupText member.

And all the rest of the derived classes.

Thank you for your understanding.

Attachments (1)

custom.zip download (1.9 KB) - added by tomay3000 9 months ago.

Download all attachments as: .zip

Change History (4)

comment:1 Changed 9 months ago by vadz

  • Resolution set to invalid
  • Status changed from new to closed

These fields are private for a good reason and I don't think at all we should make them protected. For wxDataViewDateRenderer() the right thing to do to allow customizing the display would be to add a virtual wxString DoFormat(wxDate d) method that would call d.FormatDate() by default but could be overridden to do something else. Patches/PRs doing this would be gratefully accepted as usual.

For wxDataViewTextRenderer I don't really know what do you want to do, so I can't suggest anything right now.

comment:2 Changed 9 months ago by tomay3000

  • Cc tomay3000@… added

For wxDataViewTextRenderer I mean when you need to render a floating point for example and you need to show the 2 decimals for example: 2500.00, then this class should be customized.

Changed 9 months ago by tomay3000

comment:3 Changed 9 months ago by tomay3000

  • Cc tomay3000@… removed

I had to re-implement these classes as in the attached custom.zip to achieve what is missing.

Note: See TracTickets for help on using tickets.