uiListFields
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.
Citar como
Christophe Tilman (2025). uiListFields (https://www.mathworks.com/matlabcentral/fileexchange/25026-uilistfields), MATLAB Central File Exchange. Recuperado .
Compatibilidad con la versión de MATLAB
Compatibilidad con las plataformas
Windows macOS LinuxCategorías
Etiquetas
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Descubra Live Editor
Cree scripts con código, salida y texto formateado en un documento ejecutable.
Versión | Publicado | Notas de la versión | |
---|---|---|---|
1.0.0.0 |