automatically change the string of a uicontrol (a popupmenu)

조회 수: 1 (최근 30일)
This is my question :
I have a variable (call Scenario) where I have a struct, and more specific a struct of name (come from an folder, anyway).
My question is : Can I automatically put this struct of name in the string of my popupmenu when I create the uicontrol ?
Thanks.

채택된 답변

Walter Roberson
Walter Roberson 2011년 4월 29일
set(HandleOfControl, 'String', {StructureName.FieldName})
For example,
fileinfo = dir('*.jpg');
set(H, 'String', {fileinfo.name});

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 App Building에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by