Richstring question

volvomann

Active Member
Licensed User
Longtime User
Hallo i want to use this msgbox3 to get som collor inn my msgboxes. I have a string call ssd with text loaded from an saved textfile. How can i get that text into the richstring where i hav added mystring so that text can be green?
B4X:
Sub btnStartStop_Click
      Dim rs,rs2 As RichString
rs.Initialize(" {R}{Red}{BI}Fitnesindeks{Red}{R}{BI}")
rs.Color2(Colors.Blue,"{Blue}")
rs.RelativeSize2(1.5, "{R}")
rs.Typeface2("serif", "{T}")
rs.Underscore2("{U}")
rs.Color2(Colors.Red, "{Red}")
rs.Style2(rs.STYLE_BOLD_ITALIC, "{BI}")


rs2.Initialize("{R}{T}{green}Mystring{green}{T}{R}")
rs2.Color2(Colors.green,"{green}")
rs2.RelativeSize2(1.0, "{R}")
rs2.Typeface2("serif", "{T}")
rs2.Underscore2("{U}")
rs2.Color2(Colors.Red, "{Red}")
rs2.Style2(rs.STYLE_BOLD_ITALIC, "{BI}")



Dim msg As Msgbox3
msg.Show(rs2, rs, "OK", "", "", Null)
 
Top