From: Nirmal on 14 May 2010 10:23 "Samiov " <Samyw69(a)yahoo.fr> wrote in message <hsfmfn$kqk$1(a)fred.mathworks.com>... > "us " <us(a)neurol.unizh.ch> wrote in message <hsfl7p$t3$1(a)fred.mathworks.com>... > > "Samiov " <Samyw69(a)yahoo.fr> wrote in message <hsfijc$avp$1(a)fred.mathworks.com>... > > > "us " <us(a)neurol.unizh.ch> wrote in message <hsff4p$13f$1(a)fred.mathworks.com>... > > > > "Samiov " <Samyw69(a)yahoo.fr> wrote in message <hsfeg7$jhm$1(a)fred.mathworks.com>... > > > > > Hi, > > > > > I've obtained a numerical result saved in a variable X and I want to know how to display it in an edit text in my GUI? > > > > > > > > one of the solutions > > > > > > > > v=pi; > > > > uh=uicontrol('position',[10,10,100,100],'style','edit','string',v); > > > > > > > > us > > > ______________________________________________________________________ > > > Hi us, > > > I found another solution: > > > > > > set(handles.edit4,'String',X); > > > > > > Anyway thanks a lot. > > > > no, this is the SAME solution... > > > > % we could write > > uh=uicontrol('position',[10,10,100,100],'style','edit'); > > v=pi; > > set(uh,'string',v); > > % thus, your HANDLES.EDIT4 is simply the equivalent of UH... > > > > us > ______________________________________________________________________ > Ah ok, I didn't know that...it's because I'm a beginner, thank you.. what if i have to display something in 'edit text' as output??
From: ImageAnalyst on 14 May 2010 11:33 That's what the set() command does. You're setting the 'string' property to be your output - whatever text data your want to display.
From: Nirmal on 14 May 2010 13:22 ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <5fd43f93-68ba-4311-bbcf-e822e6e00b0b(a)37g2000yqm.googlegroups.com>... > That's what the set() command does. You're setting the 'string' > property to be your output - whatever text data your want to display. ohkohk got it..thanks
From: Quentin on 4 Jun 2010 06:35 "Nirmal " <nirmal_2489(a)yahoo.co.in> wrote in message <hsk0ru$drr$1(a)fred.mathworks.com>... > ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message <5fd43f93-68ba-4311-bbcf-e822e6e00b0b(a)37g2000yqm.googlegroups.com>... > > That's what the set() command does. You're setting the 'string' > > property to be your output - whatever text data your want to display. > > ohkohk got it..thanks Hey guys, just a quick question, in my GUI, I created a Edit Text box, and did the following: function edit1_Callback(hObject, eventdata, handles) v=pi; set(handles.edit1,'String',v); However, I still get the "Edit Text" string in the box... Could you help me out? thanks!
From: Steven Lord on 4 Jun 2010 09:24 "Quentin " <quentinbehaghel(a)hotmail.com> wrote in message news:huakso$40o$1(a)fred.mathworks.com... > "Nirmal " <nirmal_2489(a)yahoo.co.in> wrote in message > <hsk0ru$drr$1(a)fred.mathworks.com>... >> ImageAnalyst <imageanalyst(a)mailinator.com> wrote in message >> <5fd43f93-68ba-4311-bbcf-e822e6e00b0b(a)37g2000yqm.googlegroups.com>... >> > That's what the set() command does. You're setting the 'string' >> > property to be your output - whatever text data your want to display. >> >> ohkohk got it..thanks > > Hey guys, > > just a quick question, in my GUI, I created a Edit Text box, and did the > following: > > function edit1_Callback(hObject, eventdata, handles) > v=pi; > set(handles.edit1,'String',v); > > However, I still get the "Edit Text" string in the box... > > Could you help me out? thanks! Do you want to display the number pi or the word 'pi' in the edit box? If the former, set(handles.edit1, 'String', num2str(pi)); If the latter, set(handles.edit1, 'String', 'pi'); If those don't work, make sure that handles.edit1 corresponds to the edit box you think it does. GET its properties, change its Visible property and make sure the edit box you expected changes visibility, etc. -- 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
First
|
Prev
|
Pages: 1 2 Prev: 'ghost' path? Next: Bayesian Neural Networks and Uncertainty 'Error' Bars |