Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

about GUI design!

5 vues (au cours des 30 derniers jours)
hadi mostafavi amjad
hadi mostafavi amjad le 5 Juil 2018
Clôturé : MATLAB Answer Bot le 20 Août 2021
i have 3 edit text in gui, and i should fill 2 of them, without considering te order of them.let me clear up, consider 3 edit text: a,b&c, so i want to fill a&b and result must shown in c, or i fill c & b and result shown in a! and so on...the question is, how should i do this?! and how should i switch between them?!
  2 commentaires
Geoff Hayes
Geoff Hayes le 5 Juil 2018
hadi - I suppose you could have edit callbacks for each of your edit text controls. So once you enter some data in a, then its callback would fire and you would check to see what is in b which would be used to populate c. Likewise, editing c would result in perhaps a or b being updated (I'm not entirely clear on what rules you would use to update either a or b).
Adam
Adam le 5 Juil 2018
You could also direct all your edit boxes to the same callback, which would check if any two of the boxes are non-empty and, if so, do whatever needs to be done with the inputs from the other two and put it in the 3rd editbox, whichever that is.
If you create an array of handles to your 3 edit boxes you can do it with indexing a little more neatly than using too many if-else statements.

Réponses (0)

Cette question est clôturée.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by