set itemheight in listbox

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Leanne

    set itemheight in listbox

    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

  • Cor Ligthert [MVP]

    #2
    Re: set itemheight in listbox

    Hi leane,

    Why do you not just try that?

    Cor

    "Leanne" <leannewu@conne ctretail.com.au schreef in bericht
    news:1162774055 .526570.316380@ k70g2000cwa.goo glegroups.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
    >

    Comment

    • Leanne

      #3
      Re: set itemheight in listbox

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

      Leanne

      Cor Ligthert [MVP] wrote:
      Hi leane,
      >
      Why do you not just try that?
      >
      Cor
      >
      "Leanne" <leannewu@conne ctretail.com.au schreef in bericht
      news:1162774055 .526570.316380@ k70g2000cwa.goo glegroups.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

      Comment

      • Tim Patrick

        #4
        Re: set itemheight in listbox

        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.Measure Item 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
        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

        Comment

        Working...