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

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 20 de Jun. de 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 comentarios
Shaun VanWeelden
Shaun VanWeelden el 20 de Jun. de 2012
Thanks! Definitely would not figured that one out..
Walter Roberson
Walter Roberson el 20 de Jun. de 2012
Did it work in your situation?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Performance en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by