Sub CLass_globals
Public mBase As B4XView
Public mTxtV As B4XView
end sub
Public Sub AddToParent
mLeft = 0
mTop = 0
mBase = xui.CreatePanel("mBase")
mParent.AddView(mBase, mLeft, mTop, 0, 0)
Dim txtV As TextField
txtV.Initialize("txtV")
mBase.AddView(txtV,0,0,mWidth,mHeight)
mTxtV=txtV
mTxtV.SetTextAlignment("CENTER","LEFT")
mTxtV.Enabled=False
end sub
sub whatever
(DO some resizing of mTxtV)
mBase.Width = mTxtV.Width
mBase.Height = mTxtV.Height ' <------ and this not always give correct results
end sub