Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Addinga checkbox to a listbox 1

Status
Not open for further replies.

VBFOXDEV35

Programmer
Mar 26, 2001
77
US
Good morning all. I have a general question regarding listboxes. I would like to add a checkbox to my listbox for selecting field(s). My goal is to have a form similiar to the MS Access DB wizard form. Where they have the list of tables in the left listbox, and a list of available fields in the right listbox where you can select the checkbox to include the field. Any ideas would be appreciated.

Thanks

Arty
 
Hi Arty,

A listbox isn't a container class and thus can't (natively) contain other controls, like checkboxes. What you're wanting to do can be done directly with a grid.

Jim
 
Hi Arty,

Jim's comments IRT the listbox control not being a container are dead-on. However, you can simulate this functionality by toggling the picture property of the list for each list item. See the following for better illustration:

HOWTO: Add a Check Box to a List in Visual FoxPro
Jon Hawkins
 
Jon, thanks for the link. This will help in trying to accomplish this.
Jim, thanks for the insight as well. At times I wish Foxpro was like VB but you know that is Uncle Bill for ya.

Thanks again fellas!!

Arty
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top