I am trying to change label text programmatically. The label has been declared in Globals and initiated in Activity_Create. The code for the text change is in another sub. I have been able to make similar text changes with buttons, but can’t seem to do this with labels.
It's the same as with Buttons.
Label1.Text = somestringvariable or
Label1.Text = "some text".
If the label is defined in a layout file you must NOT initialize it in Activity_Create !
Otherwise you are initiating a new instance and have no acces to the one difined in the layout file.
If the label is defined in a layout file you must NOT initialize it in Activity_Create !
Otherwise you are initiating a new instance and have no acces to the one defined in the layout file.
You don't give enough information !
Where and how do you define Label1 ?
- in a layout file ?
- in the code ?
Do you Dim Label1 As Label in the Globals routine ?
Hi, if I would like to have certain output (which is a combination of variables and text) from the label such as : 'result.Text = "Your annual return in % is: " annualReturn " and your investment will be returned in "years" years."'.
How do I correctly concatenate the variables' value with the text?? Help is appreciated