Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 4004

DesktopListBox.PaintCellText changes text height?

$
0
0

Wondering if anyone can confirm this or if I’m going crazy.

Got a listbox with a bunch of words in it. It displays correctly:

2024-05-25_21-54-27

But if I add a PaintCellText event to change the color of the text, the descenders seemingly get cut off by a pixel (notice the bottom of the g’s and y’s):

2024-05-25_21-56-41

Here’s the code I’m using:

Function PaintCellText(g as Graphics, row as Integer, column as Integer, x as Integer, y as Integer) Handles PaintCellText as Boolean
  Var cellText As String = Me.CellTextAt(row, column)
  g.DrawingColor = Color.RGB(179, 102, 255) ' #B366F
  g.DrawText(cellText, x, y)
  Return True
End Function

Sample project here.

Has it always behaved this way?

4 posts - 3 participants

Read full topic


Viewing all articles
Browse latest Browse all 4004

Trending Articles