MATLAB Answers

Editing a string

18 views (last 30 days)
Shounak Chakraborty
Shounak Chakraborty on 20 Jun 2012
I have an array and i want to give a string input to a cell of the array. This is easy as long as my string is normal. But, i need to change the font size and bolden the string, and also change the background colour of my cell. Can someone please help me in doing this?

Answers (1)

Christoph
Christoph on 20 Jun 2012
Hi Shounak,
what kind of cell are you talking about. And where do you want to print it? In my opinion the string itselfs shouldn't contain any style informations. I would set them in the object where you want to print it. For that reason you should read the help file to this object e.g. the property informations about that object.
good luck, CN
  3 Comments
Walter Roberson
Walter Roberson on 21 Jun 2012
Christoph is correct that font, bold, color are display attributes and are not part of a string itself.
Coloring individual cells in uitable:
http://www.mathworks.com/matlabcentral/answers/41173-changing-color-of-a-string-in-listbox-matlab-gui

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!