Info

Questa domanda è chiusa. Riaprila per modificarla o per rispondere.

about GUI design!

2 visualizzazioni (ultimi 30 giorni)
hadi mostafavi amjad
hadi mostafavi amjad il 5 Lug 2018
Chiuso: MATLAB Answer Bot il 20 Ago 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 Commenti
Geoff Hayes
Geoff Hayes il 5 Lug 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 il 5 Lug 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.

Risposte (0)

Questa domanda è chiusa.

Community Treasure Hunt

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

Start Hunting!

Translated by