Lars,
Thanks for the quick lesson as you let me figure out what the error was as
it was an empty row in the listbox.
The code worked as you shown me and thanks
Jonathon
----- Original Message -----
From: "Lars Jensen" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Sunday, March 19, 2006 12:07 PM
Subject: Re: Adding a CHECK MARK in a Listbox
Thanks for all your help but now the program give me an Out-Of-Bounds
exception error. So I had to give up on it. Not sure why.
Using the debugger to look at where the exception occurs would
probably help a lot. If you don't learn how to use the debugger at a
basic level you're probably not going to get very far with RB (or any
other language).
Your problem might be that CellBackgroundPaint is called for "empty"
rows in the listbox; i.e. the ones that are visible but that you
haven't added using AddRow. (This is so that people can paint
background stripes for the full height of the listbox even if there
are just a few rows of data. Most Listbox events don't behave this
way; many consider this a design flaw in RB.)
Try wrapping your CellBackgroundPaint code in this:
if row < me.ListCount then // don't mess with empty rows
// your code goes here
end if
lj
_______________________________________________
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>
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.5/284 - Release Date: 3/17/2006
--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.5/284 - Release Date: 3/17/2006
_______________________________________________
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>