What kind of text displays the output on Graphical user interface GUI figure ?

2 ビュー (過去 30 日間)
Christine Ak
Christine Ak 2014 年 6 月 18 日
コメント済み: Joakim Magnusson 2014 年 6 月 30 日
Hii everyone
Can any one tell me what kind of text can I use in Graphical User Interface to display the output of my code on the Graphical User Interface Figure ?
I've used Edit text and Static text , but I get Nothing :\
Thx in advance
  4 件のコメント
José-Luis
José-Luis 2014 年 6 月 18 日
Sorry, but I meant post some code.
Joakim Magnusson
Joakim Magnusson 2014 年 6 月 30 日
It's not clear what you want your code to do? Qhat do you mean with "I've used Edit text and Static text , but I get Nothing " ?

サインインしてコメントする。

回答 (1 件)

Joseph Cheng
Joseph Cheng 2014 年 6 月 18 日
編集済み: Joseph Cheng 2014 年 6 月 18 日
I attached a simple GUI that when you push the button it'll generate a random integer. and display it in a text box and the static text.
what you'll need to do is use the set() command such as set(handles.(textfield),'string',(stringyouwant));
%%such as
set(handles.edit1,'string',num2str(r));
set(handles.text1,'string',num2str(r));
depending on what you want to show you can edit pretty much any type of text field in a gui.
  2 件のコメント
Christine Ak
Christine Ak 2014 年 6 月 18 日
Thank U for replaying , but sorry to tell you that I don't want to put a button :( any suggestions ?
Joseph Cheng
Joseph Cheng 2014 年 6 月 18 日
編集済み: Joseph Cheng 2014 年 6 月 18 日
take a look at what the button does... the button is only there as a kickoff-point so it can do something.
how are you triggering the section of code to get the output you want to display?
With the vagueness of your question i supplied a example where i thought you were attempting to display some thing in a text field. What are you trying to do?

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeMigrate GUIDE Apps についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by