piDogDataView.DataView.PaintCellText
Scope: Public
Event PaintCellText(g as graphics, Row as integer, column as integer, byref x as double, y as Integer, byref width as double) As Boolean
Allows you to do the text drawing youself. Return true if you've handled the event.
Example:
Dim c As String=Me.cell(row,column)
g.TextSize=13
If Me.RowIsGroup(row) Then
//Special Group text
g.ForeColor=&cff0000
g.Italic=True
Return False
End If
If Me.Selected(row,column) Then
// Some special handling for selected rows
g.ForeColor=&c000000ef
g.DrawString(c,x,y+1)
g.ForeColor=&cffffff
g.DrawString(c,x,y)
Return True
Else
Dim vc As Variant=Me.CellValue(row,column,nil)
If vc<>nil and VarType(vc)=16 Then //color variant
// Filling a background Oval for color values
g.ForeColor=vc
g.FillRoundRect(x,2,g.Width,g.Height-4,g.Height-6,g.Height-6)
g.ForeColor=&cffffff
g.DrawString(c,x+10,y,g.Width-20,True)
Else
// If it's not color then we'll draw it black
g.ForeColor=&c000000
g.DrawString(c,x,y,g.Width-5,True)
End If
Return True
end if