S
S
swyt2020-05-31 11:54:22
C++ / C#
swyt, 2020-05-31 11:54:22

How to open the second form if the indexes in the combobox change?

(windows forms) I have combobox1 and combobox2 , selecting a value in combobox1 changes the values ​​in combobox2. I need the form to open when a value is selected in combobox2, by pressing a button, but when a value is selected in combobox1, the indexes change, what should I do?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir Korotenko, 2020-05-31
@firedragon

Create a data model and work based on its values, and in handlers just pull the methods of this model. In addition, in the most extreme case, each control has a tag field, you can throw objects into it and cast them to the desired type in the handler

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question