Home All Groups Group Topic Archive Search About

set itemheight in listbox

Author
6 Nov 2006 12:47 AM
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

Author
6 Nov 2006 4:47 AM
Cor Ligthert [MVP]
Hi leane,

Why do you not just try that?

Cor

Show quoteHide quote
"Leanne" <leann***@connectretail.com.au> schreef in bericht
news:1162774055.526570.316380@k70g2000cwa.googlegroups.com...
> 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
>
Author
6 Nov 2006 5:07 AM
Leanne
Hi Cor,
I tried. I set Drawmode=Normal and then set ItemHeight=20, but that did
not work.

Leanne

Cor Ligthert [MVP] wrote:

Show quoteHide quote
> Hi leane,
>
> Why do you not just try that?
>
> Cor
>
> "Leanne" <leann***@connectretail.com.au> schreef in bericht
> news:1162774055.526570.316380@k70g2000cwa.googlegroups.com...
> > 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
> >
Author
6 Nov 2006 6:12 AM
Tim Patrick
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.

-----
Tim Patrick
Start-to-Finish Visual Basic 2005

Show quoteHide quote
> 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