Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problems with checkbox

0 views
Skip to first unread message

Matthias

unread,
Sep 2, 2010, 6:52:04 PM9/2/10
to
Hi all,

I'm having an issue with the 'checkbox' in a GUI I'm working on. The problem is that regardless if the checkbox is marked or not, the handle always has the same value. The handle hcheckhold is always 4.0248... I need to have 2 different values! here's the code


hcheckhold = uicontrol('Style','checkbox','String','Hold',...
'Min',0,'Max',1,...
'Position',[10,10,10,10],...
'FontSize',10,'Callback',{@checkbox_Callback})

function checkbox_Callback(source,eventdata)
hcheckhold
end

Any help?

Walter Roberson

unread,
Sep 2, 2010, 8:23:58 PM9/2/10
to

get(hcheckhold,'Value')

Matthias

unread,
Sep 2, 2010, 8:57:04 PM9/2/10
to
Thanks Walter,

I pasted it inside the function and it worked perfectly,

Thanks again

G

Jan Simon

unread,
Sep 3, 2010, 12:24:04 PM9/3/10
to
Dear Matthias,

> I'm having an issue with the 'checkbox' in a GUI I'm working on. The problem is that regardless if the checkbox is marked or not, the handle always has the same value. The handle hcheckhold is always 4.0248... I need to have 2 different values! here's the code

The problem is solved already.
Did it get clear, that the handle itself must not change its value? The handle is a unique pointer to the object, while the property 'Value' of the object can change its value.

Kind regards, Jan

0 new messages