How to make disabled GUI objects not dimmed?

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?

Réponses (1)

Adam Danz
Adam Danz le 27 Avr 2021

0 votes

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 commentaires

Vojtech Siler
Vojtech Siler le 27 Avr 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 le 27 Avr 2021
Modifié(e) : Adam Danz le 29 Avr 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.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Develop Apps Using App Designer dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by