Why not figure out why you're getting an OutOfBoundsException? I don't mean to be harsh, but the ability and willingness to sort out such things is one difference between programming competence and incompetence.

Charles Yeomans

On Mar 18, 2006, at 1:36 PM, Jonathon Bevar wrote:

Jack,

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.

As for you explanation below. I have no idea how to create it or set it up. I have found an bmp pic of a checkmark but that is not a good idea as it takes up much memory.

So I am right back at the beginning wondering how to do it.

It's funny how the Listbox function does not have a CHECKMARK option included.

Thanks

Jonathon


----- Original Message ----- From: "CV" <[EMAIL PROTECTED]>
To: "Getting Started" <gettingstarted@lists.realsoftware.com>
Sent: Saturday, March 18, 2006 12:26 AM
Subject: Re: Adding a CHECK MARK in a Listbox



On Mar 17, 2006, at 9:25 AM, Jonathon Bevar wrote:

Jack,

So far your idea works the best BUT!

Yes there is a but, how do I make it work when I am entering date to the listbox that the user checks the checkbox option?

Ok, the user has the option of including this name to the printout or not. In the listbox this Checkmark will indicate if it is apart of the printout. There will be a Checkbox option allowing the user to include it or not (check or no check)

So far your example works great in the CellBackGroundPaint as I used red for the color, but can this work for normal listbox entry of some checked and some not checked and if the user does a sort of the names in the listbox, will the check mark follow that row that was checked?

Anyway thanks


A way to do this is to draw the checkmark into a picture, store it as a property, and assign it to the celltag of the cell(s) when they are to have checkmarks. In CellBackGroundPaint, check the celltag for a picture and if it isn't nil DrawPict it into the cell. That way you will keep the checkmark during sortings and scrolling. To remove the checkmark, of course, just set it to nil in your code that toggles the checkmark.

Best,

Jack




It's very easy to draw a checkmark in CellBackGroundPaint. This method draws a simple one:

Sub DrawCheckMark(g as graphics, x as integer) // x measured from left border of cell
  dim y as integer = g.TextHeight/2
  g.PenWidth = 2
  g.Drawline x, y, x + 3, y + 3
  g.DrawLine  x + 3, y + 3, x + 12, y - 6
End Sub

Call it from CellBackGroundPaint like this:

 If column = 2 and row = 3 then
    DrawCheckMark(g, 5)
    Return true
  End if

Best,

Jack
_______________________________________________

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


--------------
Charles Yeomans

_______________________________________________
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