Add or remove a row of four horizontal Edit Field (Numeric) boxes in appdesigner on button push?

1 回表示 (過去 30 日間)
I created a UI in appdesigner where the user can enter in waypoints (see attached screenshot). I have four Edit Field (Numeric) boxes where the user enters in the relevant information. I also have to buttons that remove or add waypoints (rows) when the button is pressed. However, I am not sure how to link up the respective buttons to add or remove a row of the numeric boxes.

採用された回答

Adam Danz
Adam Danz 2018 年 11 月 16 日
Edit boxes are single lined and single lined edit controls cannot have multi-lined text. So you can't add a row to an edit box. Instead, you could add another row of edit boxes. Or you could replace the edit boxes with tables and then control the number of rows in the table. The table method is probably cleanest and most efficient. Your table could have 4 columns with headers [latitude, longitude, altitiude, airspeed], and you could add and subtract rows as needed.
Here's some background info to tables in app designer
  2 件のコメント
Andrew Poissant
Andrew Poissant 2018 年 11 月 19 日
I am going the table route. Thank you for your suggestions!
Adam Danz
Adam Danz 2018 年 11 月 19 日
That's a good choice. That way all of your data will be in one place and you just need to access the right column and row. It will also be easy to add/subtract rows as needed.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by