From: M Paheerathan on
In MatLAB GUI
I want to access the text box value and properties inside of a user defined function,
How to do it?. How I should define the function header including handle?


Thanks,


Best Regards,
Paheerathan
From: Frédéric Bergeron on
"M Paheerathan" <mp.mscproject(a)yahoo.com> wrote in message <i0f847$n84$1(a)fred.mathworks.com>...
> In MatLAB GUI
> I want to access the text box value and properties inside of a user defined function,
> How to do it?. How I should define the function header including handle?

What is the «text box value»? The 'string' property maybe, wich you can access with get() and set with set().
help get, help set

When you create your text box, you can create a handles structure with guihandles if you create it in the first and «main» function of the gui. If you create it in a subfunction, you can call it handles.textbox1=uicontrol(...) and it will become part of the handles structure. You must open and save this struture in each of your subfunctions thought.

%Main function
%create a lot of uicontrol with tags
guihandles(...)
guidata(gcf,handles)

%Subfunction1
handles=guidata(gcbf) %get the handles structure

handles.textbox1=()... %create a new field

guidata(gcbf,handles) %save the handles structure with the new field

Hope it helps,
Fred