app will dispear when using uisetcolor as colorpicking function
이전 댓글 표시
Hi everyone,
I am using app desinger to creat a simple app. the function that I am working on is assign RGB value to a table by uisetcolor function. The code is listed as below:
function ColorPickerButtonPushed(app, event)
app.UITable2.Data = uisetcolor;
figure(app.UIFigure)
end
The app would go to backgroud if I try to run this button within matlab. If I export the code into a seperate app, it could disappear if I click this button. Thank you very much for any suggustion.
답변 (1개)
uisetcolor is a modal dialog meaning it blocks interaction with other windows until the user closes it. After the dialog is closed, focus should return back to your app. There is no way to make uisetcolor non-modal.
I didn't understand the second proposal in your question regarding exporting the code (which code?) and something disappearing.
update: Note that in R2021a there is a known bug that causes the crash with compiled apps when using uisetcolor. This bug was fixed. See this answer for more info.
댓글 수: 6
Jian Yu
2022년 7월 13일
Jian Yu
2022년 7월 13일
Varun Pai
2022년 11월 24일
I have a MATLAB 2021b Linux CentOS7 application. 'uisetcolor' behaves non-modal. Is it a known bug ?
Adam Danz
2022년 11월 28일
@Varun Pai, thanks for the comment. Yes, that sounds like a bug.
카테고리
도움말 센터 및 File Exchange에서 Develop Apps Using App Designer에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!