How to make disabled GUI objects not dimmed?

8 visualizaciones (últimos 30 días)
Vojtech Siler
Vojtech Siler el 27 de Abr. de 2021
Editada: Adam Danz el 29 de Abr. de 2021
I'm creating a project and I was wondering if I can change the appearance of GUI objects which are disabled by me. By default, they get "dimmed", they are greyed out and the text in them gets less visible. Is there a way to change this?

Respuestas (1)

Adam Danz
Adam Danz el 27 de Abr. de 2021
Set the Enable property of the GUI/App object.
If you want to toggle the enablem property of several components located together in a group, place them within a uipanel and set the enable property of the panel.
If you want to disable the entire app in AppDesigner, use uiprogressbar along with the with the indeterminate option.
  2 comentarios
Vojtech Siler
Vojtech Siler el 27 de Abr. de 2021
I want to keep them disabled. Specifically, I want buttons to not be clickable at a certain point, but I don't want them to have the Disabled appearance with a greyed out background and half-visible text. So I want them to stay disabled/not be clickable, but appear as if they were enabled.
Adam Danz
Adam Danz el 27 de Abr. de 2021
Editada: Adam Danz el 29 de Abr. de 2021
> I want them to stay disabled/not be clickable, but appear as if they were enabled.
That description is clearer.
There is no property that disables the object but doesn't change its appearance.
Instead you can add this to the top of the callback functions associated with the objects,
function ....
if something
return
end
%
% [REST OF THE CALLBACK FUNCTION HERE]
%
end
where something is a condition you can set and store withn the GUI/APP as a property. In this way, the callback function will do nothing when the condition is met and the appearance will not change.

Iniciar sesión para comentar.

Categorías

Más información sobre Migrate GUIDE Apps en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by