assigning data which include global and string into edit in GUI.
1 view (last 30 days)
Show older comments
a=125;
b=sprintf('latitude %13.7f degree \n', a)
% b=latitude 125.0000000 degree
%I wanna assign this created structure (latitude 125.0000000 degree) into edit in GUI environment as they appear.
3 Comments
Jan
on 18 Jun 2013
I agree that this is a certain kind of "structure", but the term is really misleading here, and "string" would be much more helpful and descriptive.
Accepted Answer
Jan
on 18 Jun 2013
a = 125;
b = sprintf('latitude %13.7f degree \n', a);
figure;
EditH = uicontrol('Style', 'edit', 'String', b);
7 Comments
Jan
on 19 Jun 2013
Edited: Jan
on 19 Jun 2013
Is this meant seriously or are you kidding?
I have written:
set(handles.EditHandle, 'String', b);
and explained:
with a matching name instead of "EditHandle". Perhaps it is "handles.edit1"
So try to replace "handles.EditHandle" by "handles.edit1". I will definitely not do this trivial replacement for you.
More Answers (0)
See Also
Categories
Find more on Migrate GUIDE Apps in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!