Pushbutton inside a while loop

Hello, I was working on a game and I have the following problem:
My idea is to create a gui where the user writes an edit text and after pushing the button, the program keeps that input and continues working with it. However, as I want to make this inside a while loop I don't know how to structure it.
My ideal structure would be the following: 1. Typing the input in the edit text gap. 2. Pushing the button. 3. Call a function which works with that input. 4. Repeat the same process until I decide to stop because of the while loop condition that I have set before pushing the button.
I really don't know how to work with this kind of situations in a gui interface and I hope you could help me. Thanks in advance!

2 件のコメント

Arunkumar Muthukumaran
Arunkumar Muthukumaran 2015 年 5 月 18 日
Hello, Create a edit text and Push button in GUI. In push button callback, read the string in edit text and use it in your while loop to process it. Is this what you were looking for?
Joseph Cheng
Joseph Cheng 2015 年 5 月 18 日
Can you explain what the process and update from the pushbutton is supposed to do? The implementation really is dependent on what you want to do in the while loop. When you say repeat the same process what happens? do you stop the current one and start it again with the new edit text? or does it include the editions into the process which you didn't tell us.

サインインしてコメントする。

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDesktop についてさらに検索

質問済み:

2015 年 5 月 18 日

コメント済み:

2015 年 5 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by