Dynamically changing a label text
Posted: Wed Mar 25, 2020 3:55 pm
Hi!
I'd like to dynamically change the text in a label in both cases when the window containing that label is open and when it is closed (but the label object still exists).
From what I can see in the SDK examples, a label can have multiple elements. This means that a label can have multiple texts.
So when I just call
the behaviour seems to be undetermined. Sometimes it changes the only text that's in there, sometimes it adds another one.
This is understandable. How should it know what to do?
So the question is: How do I do it right? I've got a label object which already is the child of a textedit object. But this label object contains just a single text. Can I change that text? And if yes, how?
Thanks,
Tom
I'd like to dynamically change the text in a label in both cases when the window containing that label is open and when it is closed (but the label object still exists).
From what I can see in the SDK examples, a label can have multiple elements. This means that a label can have multiple texts.
So when I just call
Code: Select all
SetAttrs(labelobj, LABEL_Text, "Some text", TAG_END);
This is understandable. How should it know what to do?
So the question is: How do I do it right? I've got a label object which already is the child of a textedit object. But this label object contains just a single text. Can I change that text? And if yes, how?
Thanks,
Tom