Quantcast
Channel: MATLAB Central Newsreader - tag:"checkbox"
Viewing all articles
Browse latest Browse all 18

Re: Setting GUI Checkbox Defaute value by global variable

$
0
0
"Steven Lord" <Steven_Lord@mathworks.com> wrote in message <mh37gt$h1a$1@newscl01ah.mathworks.com>...
>
>
> "Jinseok Ur" <jinseok007@naver.com> wrote in message
> news:mgrk3l$86b$1@newscl01ah.mathworks.com...
> > "Steven Lord" <Steven_Lord@mathworks.com> wrote in message
> > <mgr3ph$kpt$1@newscl01ah.mathworks.com>...
> >>
> >>
> >> "Jinseok Ur" <jinseok007@naver.com> wrote in message
> >> news:mgptrb$mk3$1@newscl01ah.mathworks.com...
> >> > Hi,
> >> > I'm making my own GUI, use checkbox and edit text.
> >> > what i want to do is using global variable to default value .
> >>
> >> I strongly recommend you NOT do that. While that would work, it also
> >> gives anyone with access to the global workspace (anyone) the ability to
> >> _accidentally_ break your GUI. Instead use one of the techniques
> >> described on this page:
> >>
> >> http://www.mathworks.com/help/matlab/creating_guis/share-data-among-callbacks.html
> >>
> >> *snip*
> >>
> >> --
> >> Steve Lord
> >> slord@mathworks.com
> >> To contact Technical Support use the Contact Us link on
> >> http://www.mathworks.com
> >
> >
> > thanks for your oppinion !
> > how about variable in GUI ?
> >
> > my goal is change default value using variable!
> > in other words variable change the inspector's value(=what i said default
> > value) in gui.m , not using inspector
> >
> > is it possible?
>
> I don't understand what you're asking. Describe in more detail what you want
> to do; if you can link to an example of another GUI that does that, that
> would help understand your problem as well.
>
> --
> Steve Lord
> slord@mathworks.com
> To contact Technical Support use the Contact Us link on
> http://www.mathworks.com

Thanks for your interest.
When i set the value, i use property inspector or use set function in gui m-file.


for example
i set the checkbox value 1 in property inspector.
then i start gui , the chekbox is chekced.
in this situation , i want to use set function, like set(handels.checkbox,'Value',0) in gui m-file to change value when i start gui.

before i used set function below checkbox_Callback , that dosen't work.
(when i start gui, checkbox was still checked.)

how can i make it?

Viewing all articles
Browse latest Browse all 18

Trending Articles