h = uitogglebutton()
h = uitogglebutton(parent)
h = uitogglebutton(..., propertyName, propertyValue)
| Paramètre | Description |
|---|---|
| parent | conteneur parent. |
| propertyName, propertyValue | paires nom-valeur. |
| Paramètre | Description |
|---|---|
| h | objet composant UI. |
tb = uitogglebutton(bg) crée un bouton bascule dans un uibuttongroup à sélection exclusive. Propriétés : Value, Text, Icon, IconAlignment, alignements, BackgroundColor, polices.
f = uifigure('Visible', 'off', 'Name', 'Toggle buttons', 'Position', [100 100 420 260]);
bg = uibuttongroup(f, 'Position', [95 60 230 140]);
tb1 = uitogglebutton(bg, 'Text', 'A', 'Position', [30 70 70 30]);
tb2 = uitogglebutton(bg, 'Text', 'B', 'Position', [125 70 70 30]);
tb2.Value = true;
drawnow();
f = uifigure();
bg = uibuttongroup(f);
tb1 = uitogglebutton(bg, 'Text', 'A');
tb2 = uitogglebutton(bg, 'Text', 'B');
| Version | Description |
|---|---|
| 2.0.0 | version initiale |