I use this code to write multiple lines in a Listbox with different text attributes:
Dim arr() as String = Split(me.cell(row,column), EndOfLine)
g.ForeColor = &c00408000
g.Bold = true
g.TextSize = 12
g.DrawString(Arr(0),x ,y - g.TextHeight)
g.textSize = 11
g.bold = false
g.foreColor = &c80808000
g.DrawString(arr(1),x,y)
g.ForeColor = &c00800000
g.DrawString(arr(2), x,y + g.TextHeight)
return True
The code is in the CellTextPaint event.
I can’t find a way to place a line of text to the right side of the cell as g.TextWidth doesn’t exist. Is it possible?