Label text


#1

I create a label with default text in the component constructor and then later I modify the label text with the setText member in a button clicked callback.

The new text is just overwriting the default text setting, as in the default text is not erased when I use the setText member.

Any explanation for this? How do I clear the default text in the label?

This is the code in the constructor that initially created the label:

ConnectionStatus -> setText (ModelSelection -> getText () + (T(" is disconnected")), false);

And this is the setText call from the buttonClicked callback routine:

ConnectionStatus -> setText (ModelSelection -> getText () + (T(" is connected on ")) +	ComPortSelection -> getText (),	false);

This string is written over top the first one.


#2

Oops…never mind…momentary lapse of reason