Copy a label

Copy a label

Forum member · Aug 22, 2006
Is it possible to copy a label? I would like to set up the properties of a label once, then apply it to several pages changing the text of the label each time. Apparently, each page references only one label object, so the label on all of the pages ends up being the same as the last value that the text was set to. I would like to do it without going through each property and assigning it to a new label oNew = New Label("",0,0,0,0) oNew.X = oOld.X oNew.Y = oOld.Y <...etc...> oNew.Text = "some new text" Thanks in advance.

Re: Copy a label

Support · Aug 22, 2006
You can have a separate Label object for each page but there is no way to make a copy out of an already existing Label to place it on another page. Each Label needs to be defined (using the keyword "New") as a separate Label. The best way to accomplish the behavior that you are looking for would be to just create a method that will create and define your label for you. Maybe pass into that method the string that you want inside any particular label but the method will take care of defining the Label, setting all the appropriate properties on that Label and will subsequently pass it back out. You can then place that it on the appropriate page. Thanks, ceTe Software Support Team