Le 9 sept. 06 à 18:08 Soir, Joe Huber a écrit:
At 2:57 PM +0200 9/9/06, Arnaud Nicolet wrote:
You'll have to use the CellTextPaint event of the listbox.
in this event, you have a graphics object, where you can first set
the font and the colour, then use g.DrawString "ˆ",x,y (x and y
are parameters of the event which indicate the preferred location
to draw the text, where the OS would draw it if you didn't handle
that). Then, return true.
Yes, this is exactly right.
The one thing I'll add is that this same event will fire for EVERY
cell in your listbox, and so you need use the Row and Column passed
into this event to decide whether you want to draw text into this
cell yourself (return True) or let RB draw the normal text into
this cell (return False)
If you do want to draw your own text, then also use the Row and
Column parameters to determine the correct text for this particular
cell.
That's right for RB 2005 and more recents.
In the first post, he precises he's using RB 5.5, where, instead of
RB 2005, these events only fire for row that are physically present.
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>