필터 지우기
필터 지우기

Deleting pushbutton from mask

조회 수: 3 (최근 30일)
Lucas Maiß
Lucas Maiß 2017년 11월 6일
댓글: Lucas Maiß 2017년 11월 17일
Hello, I would like to delete a pushbutton from a mask by a script. The pushbutton is inside a tab. I tried it like this:
Variants.maskHandle = Simulink.Mask.get('GHiL_GENERIC/pinky/HiL_ECU/IO/NIP_Editor')
p = Variants.maskHandle.removeDialogControl ('Control32')
test = Variants.maskHandle.getDialogControl('Control32')
p = Variants.maskHandle.removeDialogControl (test)
Both ways the following error occured:
No method 'removeDialogControl' with matching signature found for class 'Simulink.Mask'.
Could you give me a hint how to make it work?
Greetings Lucas
  댓글 수: 1
Lucas Maiß
Lucas Maiß 2017년 11월 17일
The answer from the MATLAB support:
>> maskObj = Simulink.Mask.get('Example/subsystem'); >> tab = maskObj.getDialogControl('Container4'); >> tab.removeDialogControl('Control2') Where the "Container4" and "Control2" are the Names for the Tab and the Button.
The reason that you receive this error is because that in MATLAB R2014b the function "removeDialogControl" does not return any output. Therefore, assigning it to a variable "p" will cause the error.

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Author Block Masks에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by