state of uitoogletool not correctly shown on a Mac

1 visualización (últimos 30 días)
Arabarra
Arabarra el 30 de Jul. de 2021
Respondida: Pratyay Pande el 30 de Ag. de 2021
Hi
I've tried this code in a Mac (10.15.6)
nfig = figure;
ht = uitoolbar(nfig);
tt = uitoggletool(ht,'CData',rand(16,16,3));
The uitoggletool doesn't gets its edge bold when it's pressed (when the State is 'on'). Funnily, if I give focus to another figure (i.e., not the one containing the uitoggletool), then the toggletool correctly shows the 'on' state.
In Linux, it works perfectly.
Has somebody seen this behaviour? Some idea to circunvent it?

Respuestas (1)

Pratyay Pande
Pratyay Pande el 30 de Ag. de 2021
There is no workaround for this issue when using the toggletool in the Java figure on Mac. For now, the only way to get around it is to use the uifigure function instead. The uifigure function uses all the newest versions of our components that avoids the bug in Java on a Mac.
You can use the following code instead:
nfig = uifigure;
ht = uitoolbar(nfig);
tt = uitoggletool(ht,'CData',rand(16,16,3));

Categorías

Más información sobre Develop uifigure-Based Apps en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by