Path: news.mathworks.com!not-for-mail
From: "ching l" <chinglnc@hotmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Gui Pushbutton default
Date: Tue, 21 Jul 2009 08:37:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 47
Message-ID: <h43und$mqu$1@fred.mathworks.com>
References: <h42ns9$kun$1@fred.mathworks.com> <14ea2dbd-e56d-4b48-8fdc-39b0060a5ee4@p36g2000prn.googlegroups.com>
Reply-To: "ching l" <chinglnc@hotmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1248165421 23390 172.30.248.38 (21 Jul 2009 08:37:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Tue, 21 Jul 2009 08:37:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1438759
Xref: news.mathworks.com comp.soft-sys.matlab:557034


Nathan <ngreco32@gmail.com> wrote in message <14ea2dbd-e56d-4b48-8fdc-39b0060a5ee4@p36g2000prn.googlegroups.com>...
> On Jul 20, 2:34?pm, "ching l" <ching...@hotmail.com> wrote:
> > Hello there,
> >
> > How do I set the pushbutton off by default?
> > This is what I've tried but apparently that isn't right.
> >
> > -----------------------------------------------------------
> > function next_Callback(hObject, eventdata, handles)
> >
> > handles = guidata(gcbo);
> >
> > set(hObject, 'enable', 'off')
> >
> > guidata(gcbo, handles);
> >
> > ------------------------------------------------------------
> >
> > Please advise.
> >
> > Thanks.
> 
> What do you mean by "off"? Do you mean disabled, or do you mean
> invisible?
> In either case...
> Let's say your push button tag is pushbutton1
> 
> To disable it:
> set(handles.pushbutton1,'Enable','off')
> 
> To make it invisible:
> set(handles.pushbutton1,'Visible','off')
> 
> Either of those should work.
> -Nathan

Hello, my push button tag is set to next. 

my codes are, 

function next_Callback(hObject, eventdata, handles)

set(handles.next,'Enable','off')

but it doesn't seem to work.

Did i miss out anything?