Effacer les filtres
Effacer les filtres

Random GUI CDATA result with buttons that is annoying? Any Ideas?

2 vues (au cours des 30 derniers jours)
Shaun VanWeelden
Shaun VanWeelden le 20 Juin 2012
So I have a GUI and I added a button to open an axes in a new figure, I have the button CDATA set to a 10x10 pixel image with no text, it mimics the tiny arrows in the matlab interface for opening tabs in new windows. Anyways, when I click the button and it executes the function, afterwards, there are random black pixels scattered throughout the image, like 5 or 6, so I mean its not a huge deal, but when you only have 100 pixels, its enough to make it look messy and annoying. When I click any other button in my GUI, it fixes itself.
I tried just resetting the CDATA at the end of the function it called, but that did not work.
Any idea why its doing this or how I could fix it?
Thanks, Shaun

Réponse acceptée

Walter Roberson
Walter Roberson le 20 Juin 2012
Sometimes there are little glitches in which the easiest way to proceed is a bit ugly:
set() the button Enable property to 'off', call drawnow() to update the screen, set() the Enable property to 'on', call drawnow() again.
  2 commentaires
Shaun VanWeelden
Shaun VanWeelden le 20 Juin 2012
Thanks! Definitely would not figured that one out..
Walter Roberson
Walter Roberson le 20 Juin 2012
Did it work in your situation?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Graphics Performance dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by