| |

VerySource

 Forgot password?
 Register
Search
View: 995|Reply: 4

How to respond to their respective messages to a dynamically generated set of edit controls?

[Copy link]

1

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2019-12-27 17:34:19
| Show all posts |Read mode
If a public message function is used to process a dynamically generated set of edit controls, how can I tell which edit control I am dealing with to get the input text value?
Reply

Use magic Report

1

Threads

3

Posts

4.00

Credits

Newbie

Rank: 1

Credits
4.00

 China

Post time: 2020-1-4 10:51:01
| Show all posts
Edit will have a name, which can be given during dynamic generation, and then the value is taken according to this name
This can be done in a function
Reply

Use magic Report

0

Threads

11

Posts

11.00

Credits

Newbie

Rank: 1

Credits
11.00

 China

Post time: 2020-1-5 12:39:01
| Show all posts
Take this edit-> Name
such as
for (int i = 0; i <this-> ControlCount; i ++)
    {
        if (dynamic_cast <TEdit *> (this-> Controls [i])-> Name == "Name")
        {;
        }
    }
Reply

Use magic Report

0

Threads

1

Posts

2.00

Credits

Newbie

Rank: 1

Credits
2.00

 China

Post time: 2020-1-6 08:39:02
| Show all posts
attention
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-2-14 23:30:01
| Show all posts
The Sender in the event is not the current Edit!
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list