uiListFields

UILISTFIELDS creates a list uicontrol component to visualize data structure.
393.0 次下载
更新时间 2009/8/14

查看许可证

UILISTFIELDS creates a list uicontrol component with hierarchical data in a figure window.
UILISTFIELDS creates an empty uiListFields object with default property values in a figure window.

UILISTFIELDS('PropertyName1', 'Value1', 'PropertyName2', Value2', ...) creates a uiListFields object with the specified properties. The properties that can be set are the same as for list uicontrol plus 'Content'.
The 'Content' property must be an object with fields (like a structure).

UILISTFIELDS(figurehandle, ...) creates a uiListFields object in the figure window specified by the figurehandle.

HANDLE = UILISTFIELDS(...) creates a uiListFields object and returns handle which correspond to the list uicontrol object handle.

Properties:

Content - structure that will be displayed in the uiListFields object
FullStructure - fields list of Content including sub levels
Levels - numbers representing hierarchical level of fullstructure
IsNode - 1 if is node
IsVisible - 1 if visible in the list
SelectedContent - give the value of the selected line of the displayed structure

on top of these properties, all uicontrol properties are present.

Examples (see the attached screenshot):
MyStruct.field1='hello';
MyStruct.field2.subfield1=123;
MyStruct.field2.subfield2=ones(5,4);
lf = uiListFields(gcf,'Position',[20 20 200 300],'Content',MyStruct)

%Creates a uiListFields in current figure window and display structure of MyStruct.
%If a line is selected in the list, use up, down, left and rigth arrow to navigate into the structure.
%If Content is a handle, properties are displayed.

get(lf,'SelectedContent')

%Return content of selected item of 'MyStruct'

display(lf)

%Return names, levels, isnode and description of MyStruct in a structured variable.

引用格式

Christophe Tilman (2024). uiListFields (https://www.mathworks.com/matlabcentral/fileexchange/25026-uilistfields), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2009a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Migrate GUIDE Apps 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0