set itemheight in listbox

  • Thread starter Thread starter Leanne
  • Start date Start date
L

Leanne

Hello,

I am trying to increase the itemheight in listbox so that it is easier
for user to touch the item. Is it possible to do that while I set
DrawMode=Normal? Do I have to set DrawMode to OwnerDraw in order to do
any change? Any one got an idea?

Thanks
Leanne
 
Hi Cor,
I tried. I set Drawmode=Normal and then set ItemHeight=20, but that did
not work.

Leanne
 
You can use OwnerDraw mode and respond to the MeasureItem event, setting
its e.Height property as needed. You will also need to implement the DrawItem
event handler. The Visual Studio online help for ListBox.MeasureItem Event
includes a sample for this event that should meet your needs for a basic
text list item.

You can also increase the font size of the control, and the item height will
increase automatically.
 
Back
Top