The Database Managers, Inc.

Contact The Database Managers, Inc.

Use an RSS enabled news reader to read these articles.Use an RSS enabled news reader to read these articles.

How to get Text of TEdit-components in a loop?

Date: Sun, 23 May 1999 19:55:26 -0700
(copied and edited from a message posted on borland.public.cpp.language)

Here's a code that might help you:

const int ch = 3;

for(int x=0; x<ComponentCount; x++)
    TWinControl *control = (TWinControl *)Components[x];
    if(control->Name == "Panel" + String(ch))
        for(int x=0; x<control->ControlCount; x++)
            if(ClassNameIs(control->Controls[x]->ClassType(), "TEdit"))
                TEdit *edit;
                edit = (TEdit *)control->Controls[x];

So I considered that you know the channel number (in this case: 3).
The code searches for a Panel called Panel3.  Then it gets all the TEdit
components in this Panel and shows their text.

Popular C++ topics at The Database Managers:

C++ FAQ Services | Programming | Contact Us | Recent Updates
Send feedback to: