function within a gui set function
Afficher commentaires plus anciens
Is it possible call upon a tag name in a gui which is dependent on a changing number? Here's my code and what I'm trying to do:
Upon opening, I set i=[0 0 0 0]. As the zeros turn to 1s in the vector, I want to change the color of different text boxes. The tags on my text boxes are named 'attempt1_1' 'attempt1_2' 'attempt1_3' and so on. In the set function, is there a way to call upon a variable to change the "number" in handles.attempt1_number?
function Red_p_Callback(hObject, eventdata, handles)
% hObject handle to Red_p (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
nextempty=find(i==0);
set(handles.attempt1_nextempty(1),'BackgroundColor','r')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Entering Commands 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!