ModelAdvisor.List - Create list class

Syntax

list = ModelAdvisor.List

Arguments

list

A variable representing the list object created.

Description

Use instances of this class to create list formatted outputs. Creates a new list object.

Method Summary

NameDescription
addItemAdd list item
setTypeSpecify list type

Methods

addItem

Purpose

Add list item

Syntax

addItem(element)

Arguments

element

Element, cell array of elements, or string to be added. When a cell array of elements is added, they form different rows in the list.

Description

This method adds items to the list.

setType

Purpose

Specify list type

Syntax

setType(listType)

Arguments

listType

String specifying type of list, either numbered or bulleted.

Description

This method specifies the type of list created.

Example

subList = ModelAdvisor.List();
subList.setType('numbered')
subList.addItem(ModelAdvisor.Text('Sub entry 1', {'pass','bold'}));
subList.addItem(ModelAdvisor.Text('Sub entry 2', {'pass','bold'}));

topList = ModelAdvisor.List();
topList.addItem([ModelAdvisor.Text('Entry level 1',{'keyword','bold'}), subList]);
topList.addItem([ModelAdvisor.Text('Entry level 2',{'keyword','bold'}), subList]);

See Also

ModelAdvisor.Image, ModelAdvisor.LineBreak, ModelAdvisor.Paragraph, ModelAdvisor.Table, ModelAdvisor.Text

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS