To achieve this I have copied the contents of /home/user/gambas-3.18.2/comp/src/gb.gui.base/.src/ListBox/ListBox.class to my project with a new class name RichListBox. I only changed one line of code in "Public Sub GridView_Data" like so:
Public Sub GridView_Data(Row As Integer, (Column) As Integer)
With $hView.Data
Try .RichText = $aText[Row] ' This is the one and only line I changed
.WordWrap = $bWrap
If $hView.Rows[Row].Selected Then
.Background = Color.SelectedBackground
.Foreground = Color.SelectedForeground
Endif
End With
End
Now I have the desired behaviour. But I was wondering is there a better way to make such a small change to an existing class - one that doesn't involve copy pasting all the code from the original class?