Quantcast
Viewing all articles
Browse latest Browse all 3

Re: How to Use CheckBox to Load .txt for PushButton

"Bruce Elliott" <bruce.elliott@jhuapl.nospam.edu> wrote in message <mh6f1u$g10$1@newscl01ah.mathworks.com>...
> "albert carero" wrote in message <mh6bbq$66h$1@newscl01ah.mathworks.com>...
> > In GUI there are

> It doesn't look like you are ever changing the value of pushbutton2, so testing its value won't tell you anything. The value does not change when the pushbutton is pushed - the callback function is simply called - that's how you know it's been pushed.
>
> I think you just need this:
>
> % --- Executes on button press in pushbutton2.
> function pushbutton2_Callback(hObject, eventdata, handles)
> if get(handles.checkbox1,'Value')
> load data.txt;
> else
> load dat.png;
> end

Hello thank you for your answer, work great :D , tried to solved it alone for 3 hours without avail, and dont know such method exist >.<. once again thank you sir :)

Viewing all articles
Browse latest Browse all 3

Trending Articles