Creating a drop-down list of available fonts in App Designer
조회 수: 1 (최근 30일)
이전 댓글 표시
I want to create a drop down list of all the available fonts in App Designer, but a couple things went wrong in the process.
1. I attempted to enter individual options by hand in this area (shown in the image below), but they all got erased when I clicked a different spot on the screen. I just wanted to alert everybody to this issue.
2. I want to be able to directly specify the value of the property rather than inputting 240 individual list items in the design view screen. This is my callback code, but App Designer doesn't seem to like the fact that I am updating my drop-down property in the callback function.
app.GraphFontDropDown.Items = listfonts;
value = app.GraphFontDropDown.Value;
set(gca,'FontName',value);
Is there a way to fix this, or do I have to create individual items in my drop-down list? Thanks!
댓글 수: 2
Chris Portal
2017년 6월 10일
Can you elaborate what you're seeing when you run your callback code? Is there an error message you're trying to fix or is it that the font isn't getting reflected on your axes?
답변 (1개)
Shruti Shivaramakrishnan
2017년 6월 14일
Please view the attached mlapp file. It contains the code specified which performs the functionality specified. Please provide details as to what functionalities would need to be added or required.
댓글 수: 0
참고 항목
카테고리
Help Center 및 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!