PDA

View Full Version : listBox with pixel font weirdness


mtw
06-13-2003, 06:07 PM
Has anyone experienced any weirdness trying to size a listBox whose items are displayed with a pixel font (size 8)?

I am trying set the rowCount of a listBox to 7, but when I use the following line, my listbox displays many more than 7 rows.
mylistbox.setRowCount(7);

I decided to play around to see if I could find some sort of predictible behavior, and if I use mylistbox.setRowCount(2); the listbox displays 3 rows!?

mylistbox.setRowCount(4); yields an actual rowCount of 6 and mylistbox.setRowCount(5); yields an actual rowCount of 8, so I can't even fake it to get 7.

If I go back to device fonts, the commands work as expected.

Anyone seen this or have a possible workaround?

Note: I can't get it to display seven rows of my pixel font by setting the size of the listBox in pixels either...

Thanks,
mtw