def __init__(self, parent, log, model=None, data=None):
        self.log = log
        wx.Panel.__init__(self, parent, -1)

        # Create a dataview control
        self.dvc = dv.DataViewCtrl(self, style=wx.BORDER_THEME
                                               | dv.DV_ROW_LINES
                                               #| dv.DV_HORIZ_RULES
                                               | dv.DV_VERT_RULES
                                               | dv.DV_MULTIPLE
                                               )

        # Create an instance of the model
        if model is None:
            self.model = TestModel(data, log)
        else:
            self.model = model
        self.dvc.AssociateModel(self.model)

        # Now we create some columns.
        c0 = self.dvc.AppendTextColumn("Id", 0, width=40)
        c0.Alignment = wx.ALIGN_RIGHT
        c0.MinWidth = 40

        # We'll use our custom renderer for these columns
        for title, col, width in [ ('Artist', 1, 170),
                                   ('Title', 2, 260),
                                   ('Genre', 3, 80)]:
            renderer = MyCustomRenderer(self.log, mode=dv.DATAVIEW_CELL_EDITABLE)
            column = dv.DataViewColumn(title, renderer, col, width=width)
            column.Alignment = wx.ALIGN_LEFT
            self.dvc.AppendColumn(column)

        # Layout
        self.Sizer = wx.BoxSizer(wx.VERTICAL)
        self.Sizer.Add(self.dvc, 1, wx.EXPAND)