Change Edit Filed text from external function
1 回表示 (過去 30 日間)
古いコメントを表示
I am trying to design a GUI console, named e.g. MainConsole where input values are entered and then sent to an external function for further calculations. If in this function a cetain value, e.g. x is generated, and I want to take it back to my console and write it into and edit field (or basically any interactive object, named DPApprox), how can I do that? I tried this:
MainConsole.LeftPanel.DPPanel.DPApprox.Text=string(x)
and did not receive an error message, but the value was not printed into the Edit Field (DPApprox in this case) and MATLAB gave this message:
ExtruderMain =
struct with fields:
LeftPanel: [1×1 struct]
What am I doing wrong?
0 件のコメント
回答 (1 件)
Sahithi Kanumarlapudi
2020 年 6 月 3 日
Hi,
The syntax which have used to update the edit field's text is correct. But could you check the data type of 'x' before converting it to string.
I could further help you if you can provide me the details about the output of the function where x is calculated and how you are passing it from the function to the GUI.
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!