Label.Text can not be changed at run time

Amalkotey

Active Member
Licensed User
Longtime User
Hello,

so that an application for different languages ​​can be set up, the translations in a text label assigned to the property. Unfortunately i do not label the text is changed. I can not delete the text. Since the text has multiple lines, which is separated with CRLF, the text should be displayed by means of upheaval in my label. This does not work. I do not know where the bug is.

The following code:

B4X:
Sub Globals
   Dim lblInfo1 As Label
   Dim lblInfo2 As Label
End Sub

Sub Activity_Create(FirstTime As Boolean)
   Activity.LoadLayout("sendorder")
   Activity.Title = Global.cTitle
   
   lblInfo1.Initialize("")
   lblInfo2.Initialize("")

   [B][U]This line does not work:[/U][/B]
   lblInfo1.Text = "Sie haben nunmehr die Möglichkeit," & CRLF & _
         "unsere PocketPC- und Smartphone-" & CRLF & _
           "Software direkt über Ihr Handy per" & CRLF & _
         "eMail oder SMS zu bestellen."

   [B][U]This line does not work:[/U][/B]      
   lblInfo2.Text = "Füllen Sie auf der nächsten Seite" & CRLF & _
         "das Formular aus und senden Sie die" & CRLF & _
         "Daten mittels eMail oder SMS an uns." & CRLF & _
         "Sie erhalten dann eine Bestätigungs-" & CRLF & _
         "mail mit unseren Zahlungsinforma-" & CRLF & _
         "tionen für Ihre Bank- oder Paypal-"& CRLF & _
         "Zahlung bzw. für Ihre Überweisung"
End Sub

Thanks for your help in advance.

best regards
Amalkotey
 

Attachments

  • runtime.jpg
    6.9 KB · Views: 214
  • designer.jpg
    7.8 KB · Views: 216
Last edited:

klaus

Expert
Licensed User
Longtime User
Are lblInfo1 and lblInfo2 defined in the layout file ?

If yes, then you must remove following lines.
lblInfo1.Initialize("")
lblInfo2.Initialize("")

It is explained in chapter 18.4 in the last version of the Beginner's Guide chapter 18.4, just released.

Best regards.
 
Upvote 0

Amalkotey

Active Member
Licensed User
Longtime User
@Klaus: Danke für Deine Hilfe.genau das war es.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…