OwnerDrawn List Box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am making a new listbox which will give me the ability to put in a title on one line, a number on the side for each item, and a description that would textwrap if the string length is bigger then the width of the listbox. I am having the problem when it comes to measuring the itemheight. I have added two items which are identical, but when the MeasureItem runs the first item height is 318 and the second one is 79. Can anyone help me

Thank you

Ilya
 
Ok, got a new problem now. Before I inherited form the Listbox control and never called base.OnMeasureItem and base.OnDrawItem. I have done that, but now when I have a string that is very large and the 2nd string is smaller they do not properly set the itemheight, but when I call out a messagebox to display the item height inside the OnMeasureItem routine the itemheight is correct. As soon as i get the messagebox.show out of the OnMeasure routine then the height is not correct again. Any suggestions

Thank you

Ilya
 
Back
Top