앱 디자이너에서 Edit Filed (Text)를 비활성화하는 방법은 무엇입니까?

1 view (last 30 days)
App Designer를 이용하여 Switch를 만들었고 Switch가 Off일때, Edit Field (Text)의 편집 가능한 상태를 비활성화하고 싶습니다.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 16 Sep 2020
다음의 예시를 통해, "Edit Field (Text)"에 대한 편집 가능의 활성화/비활성화 방법을 확인하실 수 있습니다.
function SwitchValueChanged(app, event)
value = app.Switch.Value;
if ( strcmpi(value,'On') )
app.VelocityEditField.Enable = 'On'
app.TemperatureEditField.Editable = 'On'
% app.LoadEditField.Editable = 'On'
else
app.VelocityEditField.Enable = 'Off'
app.TemperatureEditField.Editable = 'Off'
% app.LoadEditField.Editable = 'Off'
end
end
아래는 위의 예제의 결과를 보여주기 위한 캡처 이미지입니다. Editable이 꺼진 Temperature에서는 편집이 불가능하도록 설정되어 있습니다.

More Answers (0)

Categories

Find more on 앱 디자이너를 사용하여 앱 개발하기 in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!