Check if push button has an image on it or not
1 次查看(过去 30 天)
显示 更早的评论
I have a bunch of push button where the user can put pictures on but how do I check if the push button has an image on it or not? Below is the code I thought would work but wouldn't. Any help is greatly appreciated.
if (handles.pushbutton1,'cdata',[]) || (handles.pushbutton2,'cdata',[])
msgbox('There are still empty tiles')
end
0 个评论
采纳的回答
Michael Haderlein
2015-4-23
You need to use get and isequal:
if isequal(get(handles.pushbutton1,'cdata'),[]) || isequal(get(handles.pushbutton2,'cdata'),[])
%...
end
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Processing Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!