display text in next line in edit box

1 次查看(过去 30 天)
reema
reema 2014-6-1
评论: reema 2014-6-2
tmp_str=['Name= Reema','class = MCS']; want to display class in next line in edit box how can i do this? i know about matlab little bit plz help

回答(1 个)

Image Analyst
Image Analyst 2014-6-1
tempString = sprintf('Name= Reema\nclass = MCS'); % Use backslash n for new line.
set(handles.string1, 'String', tempString);
  3 个评论
Image Analyst
Image Analyst 2014-6-1
What does not work? Your code? I know since you told us already. That's why I gave you code like I use all the time and I know works . Why you chose to ignore it and not use it, I have no idea. Why did you refuse to use sprintf() like I recommended?
reema
reema 2014-6-2
SIR SEE THIS gui:
I WANT WHEN ME CLICK ON TEST BUTTON THEN TEXT WILL SHOW IN EDIT BOX(WHICH HEADING IS PERSONAL INFORMATION)..NOW TELL ME HOW I CAN DISPLAY TEXT IN THIS EDIT BOX OR ME USE TEXTBOX, TO DISPLAY TEXT? IF I USE YOUR RECOMMENDED CODE BEHIND TEST BUTTON THEN NOTHING HAPPENED..CAN I EXPLAIN WELL?? DID YOU UNDERSTAND MY PROBLEM?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Scope Variables and Generate Names 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by