I want to create a widget MyWidget that is a wxDataViewListCtrl, but has predefined columns (ID number, bitmap, text, button). Each row would represent data from some FileClass object and there should be a function to append the FileClass to the widget such that it automatically constructs each new row from the data in FileClass. How should I do this?
One idea I have is to have MyWidget inherit from wxDataViewListCtrl and add the predefined columns in the constructor. Then override the AddItem, DeleteItem and other methods. Though, this seems as a bad ideas as it leaves incompatible base methods exposed (such as the ones for deleting and adding new columns, because MyWidget should have immutable columns)
How to properly implement new wxDataViewListCtrl widget?
Re: How to properly implement new wxDataViewListCtrl widget?
When you derive from wxDataViewListCtrl, you don't have to make the base class public.
Use the source, Luke!