removeStyle(comp) removes all styles created
with the uistyle
function from the specified table, tree, list box, or drop-down UI component. To determine
which styles are on comp and available to remove, query the value of
comp.StyleConfigurations.
removeStyle(comp,ordernum)
specifies which style to remove. Specify a style based on the order in which it was added.
The property comp.StyleConfigurations lists styles in the order that
they were added.
The StyleConfigurations property value shows that style order
numbers 1 and 4 affect columns, and that the row
style was the third style added to the table. Remove the styles by specifying style
order numbers 1, 3, and
4.
UI component, specified as one of these UI components:
A Table object created with the
uitable function
A Tree object created with the uitree
function
A ListBox object created with the
uilistbox function
A DropDown object created with the
uidropdown function
The component object must be parented to a figure created with the
uifigure function or to one of its child containers.
ordernum — Style order number positive integer | vector of positive integers
Style order number, specified as a positive integer or a vector of positive
integers. To determine the styles currently applied to the table, and the order in which
they were added, query the value of the StyleConfigurations
property.
When you remove a style other than the last one that was added, the remaining styles
move up in the order to close the gaps. If no style order number is specified, all
styles are removed from the UI component.
Example: removeStyle(comp,2) removes the second style in the list
returned by comp.StyleConfigurations.
Example: removeStyle(comp,[1 3 5]) removes the first, third, and
fifth styles in the list returned by
comp.StyleConfigurations.
Example: removeStyle(comp) removes all styles from the UI
component.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.