From: nonyt on 29 May 2010 11:15 Hello, I am doing a GUI and i want to display a String on a text box when a button event occur function pushbutton1_Callback(hObject, eventdata, handles) % hObject handle to pushbutton1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) c={a;b;c;d.....}; d=c(1); i want to display to text1... Can anyone help me?
From: Walter Roberson on 29 May 2010 11:58 nonyt wrote: > Hello, I am doing a GUI > and i want to display a String on a text box when a button event occur > function pushbutton1_Callback(hObject, eventdata, handles) > % hObject handle to pushbutton1 (see GCBO) > % eventdata reserved - to be defined in a future version of MATLAB > % handles structure with handles and user data (see GUIDATA) > c={a;b;c;d.....}; > d=c(1); > i want to display to text1... set(handles.text1, 'String', d)
From: nonyt on 29 May 2010 12:37 Walter Roberson <roberson(a)hushmail.com> wrote in message <EQaMn.81300$jt.53131(a)newsfe04.iad>... > nonyt wrote: > > Hello, I am doing a GUI > > and i want to display a String on a text box when a button event occur > > function pushbutton1_Callback(hObject, eventdata, handles) > > % hObject handle to pushbutton1 (see GCBO) > > % eventdata reserved - to be defined in a future version of MATLAB > > % handles structure with handles and user data (see GUIDATA) > > c={a;b;c;d.....}; > > d=c(1); > > i want to display to text1... > > set(handles.text1, 'String', d) Thank you very much is working!!! I have another question... When i program the GUI I use some variables that i want them to be used when more than one buttons execute where do i have to put the definition of the variables to be public in all the functions of the buttons??
From: Matt Fig on 29 May 2010 12:46 I assume you are using GUIDE to create your GUI. Have a look at the help for the GUIDATA function.
From: Steven Lord on 1 Jun 2010 14:34 "nonyt " <mariaki16(a)hotmail.com> wrote in message news:htrfrg$ae1$1(a)fred.mathworks.com... > Walter Roberson <roberson(a)hushmail.com> wrote in message > <EQaMn.81300$jt.53131(a)newsfe04.iad>... >> nonyt wrote: >> > Hello, I am doing a GUI >> > and i want to display a String on a text box when a button event occur >> > function pushbutton1_Callback(hObject, eventdata, handles) >> > % hObject handle to pushbutton1 (see GCBO) >> > % eventdata reserved - to be defined in a future version of MATLAB >> > % handles structure with handles and user data (see GUIDATA) >> > c={a;b;c;d.....}; >> > d=c(1); >> > i want to display to text1... >> >> set(handles.text1, 'String', d) > > Thank you very much is working!!! > I have another question... > When i program the GUI I use some variables that i want them to be used > when more than one buttons execute where do i have to put the definition > of the variables to be public in all the functions of the buttons?? http://www.mathworks.com/access/helpdesk/help/techdoc/creating_guis/f5-998197.html http://www.mathworks.com/access/helpdesk/help/techdoc/creating_guis/f13-998197.html -- Steve Lord slord(a)mathworks.com comp.soft-sys.matlab (CSSM) FAQ: http://matlabwiki.mathworks.com/MATLAB_FAQ To contact Technical Support use the Contact Us link on http://www.mathworks.com
|
Pages: 1 Prev: reading a bunch of data files with non-consecutive file names Next: Serial SOF character |