Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
Dim text1, text2 As String
Dim sf As StringFunctions
Dim lbl As Label
Dim cvs As Canvas
Dim w As Float
text1 = "Bier"
text2 = "2.50 €"
sf.Initialize
lbl.Initialize("lbl")
cvs.Initialize(Activity)
Activity.AddView(lbl,10%x,0,40%x,30dip)
lbl.Color = Colors.Red
lbl.Typeface=Typeface.MONOSPACE
Log("X= " & cvs.MeasureStringWidth("X",Typeface.MONOSPACE,14))
Log("lbl.Width= " & lbl.Width)
w = Floor(lbl.Width/cvs.MeasureStringWidth("X",Typeface.MONOSPACE,14))
Log("max Char: " & w)
w = w-text2.Length
Log("max Char - text2: " & w)
lbl.Text = sf.Pad(text1,".",w,True) & text2
End Sub