Feedback
Custom ListBox text does not match the ListBox font
- Status
- Fixed
- Fixed in
- v26.10.3
- Area
- desktop
- Source discussion
- https://forum.objo.dev/d/1323-listbox-fontsize-in-a-cell
- Last updated
- 2026-10-20
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
Text drawn in a ListBox's PaintCellText event can use a different font from the normal cell text even after the handler copies the ListBox's FontName, FontSize, Bold and Italic settings. The custom text can look narrower or differently shaped despite having the same font size.
Copying the ListBox's typography should select the same font for custom drawing and text measurement. As a temporary workaround, explicitly set the ListBox to an installed font such as Arial, then copy its font settings in the paint handler.