Le 9 sept. 06 à 09:30 Matin, sir_brando a écrit:

Alright, I've been around this forum a bit looking for answers, but I cant
seem to find em.  I have a listbox with multiple columns, it displays
results of a test. First column shows question numbers, second column shows "yes" or "no" if you got it right or not, then it repeats for the rest of the columns. I was wanting to change the simple "yes" "no" to a checkmark and an x. Was going to use the symbols from the wingding font, but i havent found how to just change the font for an individual cell. Then i was also wanting to make the checkmark green and the x red, add a little color to it.
Also, im populating the listbox with something like this:

for i = 1 to maxq
if choice(i) = answer(i) then
listbox.cell(i,column) = "yes"
else
listbox.cell(i,column) = "no"
end if
next i

I'm not on my rb machine so not sure if thats the exact code, but thats the just of it. If anyone could help me out here it would be great. Thanks.

You'll have to use the CellTextPaint event of the listbox. (well, this seems complicated for solving a simple problem, but it's the method using realbasic).

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.

HTH_______________________________________________
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>

Reply via email to