Hello everyone, i have noticed this issue before but never really bothered me as much as it is today, I have a layout with a few views, I also have a TextField, the height of this field is changed according to the Text Height, if the TextField is significantly large I also need to change the height of the overall Item, ie, the parent panel's height.
The problem i'm having is that while the same code works in the B4A version, it doesn't seem to work in the B4i version.
Here is the relevant code where the item is created.
Basically the item only needs to be resized if the Textfield's height is large enough, the problem is that panel's height doesn't get resized after a certain height, i'm guessing after the 480dip that is originally set to, but why is that, I should be able to resize it's height to whatever height i want, what ends up happening is that i end up with a huge gap instead between the item that I want resized and the item below it.
Any thoughts on why that happens? as I mentioned i've noticed this issue before but never really thought about asking why this happens.
Thanks,
Walter
The problem i'm having is that while the same code works in the B4A version, it doesn't seem to work in the B4i version.
Here is the relevant code where the item is created.
B4X:
Dim Panelheight As Int = 480dip
c6IconEd.Visible = False
Dim c6itemlabelnote2 As Label
c6itemlabelnote2.Initialize("c6itemlabelnote")
c6itemlabelnote2.Text = CbMap.GetDefault("note1", "")
c6itemlabelnote2.SizeToFit
c6itemlabelnote2.TextColor = Colors.Blue 'Starter.MyColorBlack54
c6itemlabelnote2.Multiline = True
c6itemlabelnote2.Color = Starter.MyColorBlack05
c6itemlabelnote2.Tag = CbMap
c6itemlabelnote2.SetLayoutAnimated(0, 0, 0,0, c6itempanelback.Width, 20dip) ' MUST be here!!
Dim S As String = c6itemlabelnote2.Text
Dim c6labelhcalc As Int = S.MeasureHeight(Font.DEFAULT)
LogColor("c6labelhcalc: " & c6labelhcalc, Colors.Blue)
Dim PanelHeight2 As Int = PanelHeight + c6labelhcalc
c6itempanelback.AddView(c6itemlabelnote2, 16dip, c6IconEd.top + 4dip, c6itempanelback.Width -32dip, c6labelhcalc)
c6itemlabelnote2.Height = c6labelhcalc + 20dip
If (c6itemlabelnote2.Top + c6itemlabelnote2.Height + 20dip) > PanelHeight Then
p.Height = PanelHeight2
LogColor("p.height: " & p.Height, Colors.Green)
c6itempanelback.Height = p.Height
c6itempanelframe.Height = c6itempanelback.Height
''c0tabCLV_c6list.ResizeItem(Index, PanelHeight2)
''Sleep(100)
Else
''nothing here
End If
Basically the item only needs to be resized if the Textfield's height is large enough, the problem is that panel's height doesn't get resized after a certain height, i'm guessing after the 480dip that is originally set to, but why is that, I should be able to resize it's height to whatever height i want, what ends up happening is that i end up with a huge gap instead between the item that I want resized and the item below it.
Any thoughts on why that happens? as I mentioned i've noticed this issue before but never really thought about asking why this happens.
Thanks,
Walter