Code covered by the BSD License  

Highlights from
uiListFields

Be the first to rate this file! 0 Downloads (last 30 days) File Size: 3.55 KB File ID: #25026
image thumbnail

uiListFields

by Christophe Tilman

 

14 Aug 2009

UILISTFIELDS creates a list uicontrol component to visualize data structure.

| Watch this File

File Information
Description

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.

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
data exploration Christophe Tilman 14 Aug 2009 11:27:15
list view Christophe Tilman 14 Aug 2009 11:27:16
data structure Christophe Tilman 14 Aug 2009 11:27:16

Contact us at files@mathworks.com