f



how switch off an edit box in gui if box is not empty

HI

I'm trying to make a edit box invisible by using

set(handles.freq_low,'Visible','off')

when  i switch to a nother functionality, but matlab complains based
on the fact the edit box isn't empty.

how can i get matlab to discard the fact that the box isn't empty ???

rgds
icecube
0
matlab.ice (28)
7/24/2008 6:38:40 AM
comp.soft-sys.matlab 211266 articles. 22 followers. lunamoonmoon (257) is leader. Post Follow

3 Replies
532 Views

Similar Articles

[PageSpeed] 26

icecube:
<SNIP unexpected behavior...

> set(handles.freq_low,'Visible','off')
> when  i switch to a nother functionality, but matlab 
complains based on the fact the edit box isn't empty...

this works fine...

     uh=uicontrol(...
        'position',[10,10,100,100],...
        'style','edit',...
        'string','foo');
     onoff={'on','off'};
for  i=1:10
     set(uh,'visible',onoff{rem(i,2)+1});
     pause(.25);
end

now - how does the error on your side look like...
us
0
us1 (8051)
7/24/2008 8:18:02 AM
On 24 Jul., 10:18, "us " <u...@neurol.unizh.ch> wrote:
> icecube:
> <SNIP unexpected behavior...
>
> > set(handles.freq_low,'Visible','off')
> > when =A0i switch to a nother functionality, but matlab
>
> complains based on the fact the edit box isn't empty...
>
> this works fine...
>
> =A0 =A0 =A0uh=3Duicontrol(...
> =A0 =A0 =A0 =A0 'position',[10,10,100,100],...
> =A0 =A0 =A0 =A0 'style','edit',...
> =A0 =A0 =A0 =A0 'string','foo');
> =A0 =A0 =A0onoff=3D{'on','off'};
> for =A0i=3D1:10
> =A0 =A0 =A0set(uh,'visible',onoff{rem(i,2)+1});
> =A0 =A0 =A0pause(.25);
> end
>
> now - how does the error on your side look like...
> us

error mesege

only happes if freq_low isn't empty
"
Invalid handle object.

Error in =3D=3D> filweig>F_select_Callback at 416
        set(handles.freq_low,'Visible','off')

Error in =3D=3D> gui_mainfcn at 75
        feval(varargin{:});

Error in =3D=3D> filweig at 42
    gui_mainfcn(gui_State, varargin{:});

??? Error while evaluating uicontrol Callback.
"
0
matlab.ice (28)
7/24/2008 9:30:01 AM
On 24 Jul., 11:30, icecube <matlab....@googlemail.com> wrote:
> On 24 Jul., 10:18, "us " <u...@neurol.unizh.ch> wrote:
>
>
>
>
>
> > icecube:
> > <SNIP unexpected behavior...
>
> > > set(handles.freq_low,'Visible','off')
> > > when =A0i switch to a nother functionality, but matlab
>
> > complains based on the fact the edit box isn't empty...
>
> > this works fine...
>
> > =A0 =A0 =A0uh=3Duicontrol(...
> > =A0 =A0 =A0 =A0 'position',[10,10,100,100],...
> > =A0 =A0 =A0 =A0 'style','edit',...
> > =A0 =A0 =A0 =A0 'string','foo');
> > =A0 =A0 =A0onoff=3D{'on','off'};
> > for =A0i=3D1:10
> > =A0 =A0 =A0set(uh,'visible',onoff{rem(i,2)+1});
> > =A0 =A0 =A0pause(.25);
> > end
>
> > now - how does the error on your side look like...
> > us
>
> error mesege
>
> only happes if freq_low isn't empty
> "
> Invalid handle object.
>
> Error in =3D=3D> filweig>F_select_Callback at 416
> =A0 =A0 =A0 =A0 set(handles.freq_low,'Visible','off')
>
> Error in =3D=3D> gui_mainfcn at 75
> =A0 =A0 =A0 =A0 feval(varargin{:});
>
> Error in =3D=3D> filweig at 42
> =A0 =A0 gui_mainfcn(gui_State, varargin{:});
>
> ??? Error while evaluating uicontrol Callback.
> "- Skjul tekst i anf=F8rselstegn -
>
> - Vis tekst i anf=F8rselstegn -

sorry i missunderstod

when running your code iget no error

0
matlab.ice (28)
7/24/2008 10:11:23 AM
Reply: