Hallo Simon
SH> I have managed to create code which deals with putting items wider
SH> than the list box onto two lines but not yet managed to get this
SH> working for more than that. i.e. to recognise how many then loop
SH> through for each one.
SH> I tried to set the height variable passed in OnmeasureItem and then
SH> inspect it in OnDrawItem but it didn't work :(
It does work, be carefull not to rely on the Items[Index].Object value
though, you cannot get to it for some from within MeasureItem for some
reason. Setting Height for an item however should work just fine. The maximum
height is 255 pixels. What is your problem exactly?
SH> Is there any good reason why OnDrawItem can't be empty?
Well, you do want something to be drawn, right? The beauty of OwnerDraw mode
is that nothing will be drawn unless you want it to.
SH> Is there a much more elegant solution (there must be somewhere)
This is as elegant as it gets. Did you set the draw mode to
OwnerDrawVariable? You need to do this in order to be able to set the height
of individual items.
Groeten, Martin.
--- FMail/386 1.02
---------------
* Origin: -=[ E-mail: m_maat@knoware.nl .......... ]=- (2:286/420.1)
|