S Scantech Well-Known Member Licensed User Longtime User Sep 18, 2017 #1 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
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
Jeffrey Cameron Well-Known Member Licensed User Longtime User Sep 18, 2017 #2 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
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.
D dagnabitboy Active Member Licensed User Longtime User Sep 18, 2017 #3 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: Sep 18, 2017 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