is there a way to change a certain line using sprintf in textbox in app designer
14 views (last 30 days)
i have the code set up to display sertain lines in a text box using a sting so they can be added or removed with their certain values but i am also trying to change this color.
% In properties
%% in done push buton call back
fpmct1 =[fpqt1t1, fpqt1t2, fpqt1t3]';
fp1= "%s\t: %.0f %.1f %.1f %.1f"; %s disp Flatpack mc \t(tabs) %.1f is the number value
fp1= "%s\t: %.0f %.2f %.2f %.2f"; % save as above
the fp1 is the line i want to change the color of to like yellowish green. the entire if statment is multiplied by like 14 for each different item which i want to be another color.
Mohammad Sami on 25 Jun 2021
uihtml supports html. So you will need to generate your text in html format. Then you can set this text as HTML Source
a = uihtml;
a.HTMLSource = '<p style="color:#FF0000";>Red paragraph text</p><p style="color:#0000FF";>Blue paragraph text</p>';