Android Question Passing CSBuilder

Scantech

Well-Known Member
Licensed User
Longtime User
How do you pass CSBuilder to another CSBuilder without loosing the Color properties?

For example
Code: Copy
    Dim Label1 As Label
    Label1.Initialize("")
   
    Dim CS1 As CSBuilder
    CS1.Initialize
   
    Dim CS2 As CSBuilder
    CS2.Initialize
   
    CS1.Color(Colors.Red).Pop.Append("Testing").Pop.Color(Colors.Blue).Pop.Append("CSBuilder").PopAll
    CS2 = CS1
   
    Label1.Text = CS2
 
Did you try:
Code: Copy
Dim CS2 As CSBuilder
CS2.Initialize
CS2.Append(CS1)

I haven't tried it, but since the append method takes a char sequence I would assume this would work.
 
Upvote 0
You put a "Pop" right after adding colors.red and colors.blue, which effectively removes those colors.
I tested your idea and you can indeed equate CS2 = CS1.
Remove the extra pop as below and you'll be good to go.

Code: Copy
CS1.Color(Colors.Red).Append("Testing").Pop.Color(Colors.Blue).Append("CSBuilder").PopAll
 
Last edited:
Upvote 0

Similar Threads

Replies
0
Views
9K
  • Article Article
Android Code Snippet Save and load CSBuilders
Replies
5
Views
7K
  • Article Article
Android Code Snippet CSBuilder with leading margin
Replies
2
Views
6K
Replies
1
Views
3K
Back
Top