Wish [B4X] ScrollingLabel XUI View

klaus

Expert
Licensed User
Longtime User
According to the question HERE, I was looking at the source code.
In fact, the label TextColor is hard coded to black.
I would suggest to add this line
mTextColor = l.TextColor
into the DesignerCreateView routine to be able to set the text color directly in the Designer.

B4X:
Public Sub DesignerCreateView (Base As Object, Lbl As Label, Props As Map)
    mBase = Base
    Tag = mBase.Tag : mBase.Tag = Me
    'In B4J the passed panel doesn't clip its child views. We need to add another one:
    Dim p As B4XView = xui.CreatePanel("")
    mBase.AddView(p, 0, 0, mBase.Width, mBase.Height)
    mText = Lbl.Text
    Dim l As B4XView = Lbl
    fnt = l.Font
    mTextColor = l.TextColor
    Dim p As B4XView = xui.CreatePanel("")
    p.SetLayoutAnimated(0, 0, 0, 2dip, 2dip)
    cvs.Initialize(p)
    setText(mText)
End Sub
 
Top