Android Question spDialog - button ignoring richstring formats

richthom

New Member
Licensed User
Longtime User
Hi

First post so firstly to say how happy my first steps using B4A - keep up the good work!

I have been trying spDialog because I wish to avoid the default button text which are coloured blue/green and wish to format them differently (white text) .

When I tried a simple example using msgbox3 - it was possible to format the message string but not the button strings (see code below).

Can someone confirm if it is possible to do this using spDialog or some other way?



'in code below the richstring "This is another richstring" is put in as button text and is ignored:
'the msgbox shows the button text as "THIS IS ANOTHER RICHSTRING" in colour blue and in caps
'Note - I have swapped rs and rsOK and this confirms to demonstrate the issue
Dim rs As RichString
rs.Initialize("{R}{T}{Blue}This{Blue}{T}{R} {U}is{U} another {Red}{BI}Rich{Red}String{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}")
Dim rsOK As RichString
rsOK.Initialize("{U}{White}OK{White}{U}")
rsOK.Color2(Colors.White, "{White}")
rsOK.Underscore2("{U}")
Dim msg As Msgbox3
msg.Show("RichString Demo" ,rsOK, rs, "", "", Null)
 
Top