Changing color of a string in listbox - MATLAB GUI
古いコメントを表示
I have a list of names in a listbox. What I would like to do is have a certain selected name change color, from red to green, when I click a button.
Thank you
採用された回答
その他の回答 (6 件)
Tom
2012 年 6 月 14 日
1 投票
You can do it with html- see http://undocumentedmatlab.com/blog/html-support-in-matlab-uicomponents/
Vincent I
2012 年 6 月 14 日
0 投票
1 件のコメント
Dr. Seis
2012 年 6 月 14 日
What you are generally describing above should work with HTML... can you post a few pictures of what you envision? Or can you post the cell-string you are using to apply to the listbox... there might be a formatting issue that is preventing it from working.
Vincent I
2012 年 6 月 18 日
0 投票
5 件のコメント
Walter Roberson
2012 年 6 月 18 日
The code I gave puts the entry back in the same place it was.
Walter Roberson
2012 年 6 月 18 日
Record the Value before you clear it. assign contents{} at that value to be the new line. set() the String to be the changed "contents" cell array.
Vincent I
2012 年 6 月 18 日
Vincent I
2012 年 6 月 18 日
Walter Roberson
2012 年 6 月 18 日
<FONT color="cyan">
Vincent I
2012 年 6 月 18 日
0 投票
1 件のコメント
Walter Roberson
2012 年 6 月 18 日
namestr(validx) = []; %delete it from where it was
namestr = [ {newstr}; namestr ];
カテゴリ
ヘルプ センター および File Exchange で Interactive Control and Callbacks についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!