Change Edit Filed text from external function

조회 수: 1 (최근 30일)
Saeid
Saeid 2020년 5월 31일
댓글: Saeid 2020년 6월 8일
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?

답변 (1개)

Sahithi Kanumarlapudi
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.
  댓글 수: 1
Saeid
Saeid 2020년 6월 8일
Hi Sahithi,
thank you for your help. Let me find the data and I will get back to you.
Saeid

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by