Enable a push button after testing conditions obtained from two other push buttons

1 次查看(过去 30 天)
Hi, Folks!
I have a question about using guide and I hope someone can help me.
From two push buttons, their callbacks give two values: flag1 and flag2.
So, I want to enable a third push button after comparing both flag1 and flag2. Where should I insert the if to get that?
Thanks in advanced!

采纳的回答

Walter Roberson
Walter Roberson 2016-5-24
In the callbacks of both of the first two push buttons you would have something like
if handles.flag1 && handles.flag2
set(handles.button3, 'enable', 'on')
else
set(handles.button3, 'enable', 'off');
end
  1 个评论
Hugo Mendonça
Hugo Mendonça 2016-5-24
编辑:Hugo Mendonça 2016-5-24
Thank you, Walter! I just complement your answer saying that it is needed to initialize both handle structures (handle.flag1 and handle.flag2) in OpeningFcn.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by