Slighthaze [color blue]NULL[/color]
[img http://www.sweetpotatosoftware.com/ttimages/listboxcheckbox.gif] First of all, allow me to give credit to the book "1001 Things You Wanted to Know About Visual Foxpro" and its Authors: Marcia Akins, Andy Kramek & Rick Schummer. This is where I first learned the techniques that make this possible.
In order to show checkboxes in a listbox and hook the whole thing up to a table you need to use the picture property array (among other things) of the listbox. They aren't really checkboxes, they're icons. In fact the ones I'm using are more like lights (I wanted to provide an example that you could run right out of the box). You can use whatever images you want...find a couple of really good images of checkboxes that are checked and unchecked and just replace the appropriate form properties.
The listbox has a cursor for a rowsource and one of the "checked" field is used to keep track of which records are checked/unchecked. You could even take it a step further and change the Checked field to numeric and have a Multi-State checkbox with values 0, 1, & 2 and use three images. (Cut-N-Paste the code below into a prg file and run it from within VFP)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.