I'm not sure what you mean. A listBox is a control in VFP (like a command button) that is part of VFP baseclass, that you can use in your development. Do you mean "invent" a new control? Most of VFP is written in C++, are you familiar with C++?
Mike Gagnon
If you want to get the best response to a question, please check out FAQ184-2483 first.
What do you mean by "Re-Create it from scratch"?
If you mean, how do you set it up, You need to set these properties:
BoundTo = .T. (Required when BoundColumn is numeric, but doesn't hurt anything if the BoundColumn is Character)
ControlSource = Field in Table to update
RowSourceType
RowSource
BoundColumn.
So what are BoundTo and BoundColumn used for?
These properties determine how the control gets its value. The value of a combo or list box is taken from the column of its internal list that is specified by its BoundColumn. A combo box's DisplayValue, the value that is displayed in the text portion of the control, always comes from column one! Its value, on the other hand, can be taken from any column of its internal list. This means you can display meaningful text, such as the description from a lookup table, at the same time the control gets its value from the associated key. You do not even have to display this associated key in the list to have access to it.
For example, suppose the user must assign a particular contact type to each contact when it is entered. The appropriate contact type can be selected from a DropDown List with its RowSourceType set to 6-Fields, its RowSource set to “ContactType.CT_Type, CT_Key” where CT_Type is the description and CT_Key is its associated key in the ContactType table. To set up the control, first set the DropDown List's ColumnCount to 2 and its ColumnWidths to 150, 0. Then set the BoundColumn to 2 to update the bound field in the Contacts table from the key value instead of the description.
mgagnon (Programmer)
Yes Mike, I'm familiar with C\C++ langauge. That's my first language. But I didn't know that most of VFP is written in C++. Thank you for this piece of info.
And yes I do want to 'invent' a new list control.
Thank you for showing me the path.
Regards
As I go deeper the road seems to go further. We're just simply pasangers on the road of knowledge.
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.