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>