Effacer les filtres
Effacer les filtres


Cette question est clôturée. Rouvrir pour modifier ou répondre.

pushbutton coloring problem

3 vues (au cours des 30 derniers jours)
marvin le 16 Mai 2011
Clôturé : MATLAB Answer Bot le 20 Août 2021
Using 64-bit R2010a matlab for mac I have a problem with pushbutton coloring. Basically doing
Position = [0.2 0.2 0.2 0.2]
hdl = uicontrol('Units', 'Normalized', 'Position', Position, ...
'Style', 'PushButton', 'BackgroundColor', [0 1 0])
Should create a colored pushbutton but instead the pushbutton remains white. Adding Foreground color does not solve it. There's no problem with this code on e.g. 32-bit platform. Anybody an idea for a fix?

Réponses (1)

Jarrod Rivituso
Jarrod Rivituso le 16 Mai 2011
Sounds like a bug. I would report it using the "Contact Support" button here:
Potential workaround is to try setting the CData property
Position = [0.2 0.2 0.2 0.2]
hdl = uicontrol('Units', 'Normalized', 'Position', Position, ...
'Style', 'PushButton')
Hope this helps!

Community Treasure Hunt

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

Start Hunting!

Translated by