>Greetings all.
>
>I have a question about gathering names in developer mode. I made a builder that creates arrays and SQL statements for validation or lookups. The SQL statement will be built with any number of where clauses based on user’s input. To simply the SQL statement, the builder creates MVs that contain the ‘where’ logic and this mv is then evaluated in the SQL statement with the & operator.
>
>After the base code is created, the developer then must fill in the control names for the ‘where’ logic. In most cases the code is used for finding records. So the controls will have the desired data qualifications you will search by.
>
>In design mode, can I gather the control names from a particular form in order to select them from a dropdown list to further complete this builder?
>
>Thank you in advance,
>
>Gary De Lecce
Tamar gave you an answer for VFP
With .NET, the code below disables all the controls on a form.
You could change to code to add the names to the items in your listbox.
I assume by controls you mean controls that address data, as opposed to buttons, labels, etc., so you'd have add some code to limit the list to the controls you want.
Note that Tab Pages have to be dealt with.
foreach (Control c in this.Controls)
{
c.Enabled = false;
foreach (Control d in c.Controls)
if (d is TabPage)
foreach (Control ctl in d.Controls)
{
if (ctl is Label)
{
ctl.Enabled = true;
}
else
{
ctl.Enabled = false;
}
}
else
{
d.Enabled = false;
}
}
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.