Jul 7, 2020 Replies: 1 A small point about CSBuilder. You cannot mix CSBuilder objects with 'standard' text because the formatting will be lost. This works as expected: B4X: Copy cs.Initialize.Append("Hello ") cs.Color(Colors.Blue).Append("world!").Pop lbl.Text = cs but this removes all formatting: B4X: Copy cs.Initialize.Append("Hello ") cs.Color(Colors.Blue).Append("world!").Pop lbl.Text = cs & " " Click to expand...
A small point about CSBuilder. You cannot mix CSBuilder objects with 'standard' text because the formatting will be lost. This works as expected: B4X: Copy cs.Initialize.Append("Hello ") cs.Color(Colors.Blue).Append("world!").Pop lbl.Text = cs but this removes all formatting: B4X: Copy cs.Initialize.Append("Hello ") cs.Color(Colors.Blue).Append("world!").Pop lbl.Text = cs & " "
M Mahares Expert Licensed User Longtime User Jul 25, 2020 #2 ShepSoft said: You cannot mix CSBuilder objects with 'standard' text because the formatting will be lost. Click to expand... If you want to preserve the formatting, simply do this: cs=cs.Append(" ") instead of this: lbl.Text = cs & " " Code: Copy cs.Initialize.Append("Hello ") cs.Color(Colors.Blue).Append("world!").Pop lbl.Text = cs=cs.Append(" ")
ShepSoft said: You cannot mix CSBuilder objects with 'standard' text because the formatting will be lost. Click to expand... If you want to preserve the formatting, simply do this: cs=cs.Append(" ") instead of this: lbl.Text = cs & " " Code: Copy cs.Initialize.Append("Hello ") cs.Color(Colors.Blue).Append("world!").Pop lbl.Text = cs=cs.Append(" ")