app designer does not get the value from edit field in panel

조회 수: 9 (최근 30일)
farzad
farzad 2020년 9월 4일
답변: Mario Malic 2020년 9월 4일
Hi All
I have an edit field that is inside a panel. It seems that when I call the value with app.variable , it can not be read. How to fix? am I using the wrong method ?
% Value changed function: ColumnEditField
function ColumnEditFieldValueChanged(app, event)
app.col = app.ColumnEditField.Value;
end
  댓글 수: 3
farzad
farzad 2020년 9월 4일
It says it doesn't know the variable.
Xavier
Xavier 2020년 9월 4일
Have you verified that the edit field is still named "ColumnEditField"? You can check by using the Component Browser pane in the design view
Alternatively have you created the 'col' property within the app?

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

답변 (1개)

Mario Malic
Mario Malic 2020년 9월 4일
It's correct what you've written and what Xavier suggested. You need to create a property col.
If col is a number, use col = [];
If col is a char, use col = '';

카테고리

Help CenterFile Exchange에서 Migrate GUIDE Apps에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by