uiListFields

UILISTFIELDS creates a list uicontrol component to visualize data structure.
393 Downloads
Updated 14 Aug 2009

View License

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.

Cite As

Christophe Tilman (2026). uiListFields (https://uk.mathworks.com/matlabcentral/fileexchange/25026-uilistfields), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2009a
Compatible with any release
Platform Compatibility
Windows macOS Linux
Version Published Release Notes
1.0.0.0