In ABMList I can add any type of ABM component, but if I add different height items they are compressed at the same standard height. I tried the InitializeWithMaxHeight hoping could be the solution, but it seems to work in the same way as the standard Initialize.
any suggestions?
thanks
Roberto
I'm not sure this is possible. I do know InitializeWithMaxHeight is for the whole list, not for an item. Maybe putting each item in a container first can work?
The items are just embedded in a container, more or less like this forum messages. Anyway using Initialize or InitializeWithMaxHeight the heights of the items are the same.
I don't know if I understand your response, but: @alwaysbusy meant -put a single item into a new container - then add this new container to the ABMList.... and repeat for each item...
I don't know about ABMLists (I don't use) - but when using ABMCombo, this restricts the height of the dropdown to show only 4 items (for example) with a scrollbar to access other items...
Sometimes, when all else fails, I resort to the ABMTable which may adjust the row size (height) depending on the content - such as an image (bitmap not resized) in a cell...
Good luck with this. I am sure you will work it out...
I confirm: first I put my item in a new container and then I add each container in the ABMList.
Originally I used a direct load of the container's items in the page:
B4X:
For i = 0 To mySe.myTh.lstClassThreadEl.Size - 1
Dim thEl As ThreadEl = mySe.myTh.lstClassThreadEl.Get(i)
Dim singleMessage As ABMContainer = ABMShared.BuildSingleMessage(page,mySe,i,thEl)
page.Cell(2,1).AddComponent(singleMessage)
' liMsgs.AddItem("limsgs-" & i,singleMessage)
Next
and the result was this:
but I need to select a single item and so I tried to insert the items in an ABMList like this:
B4X:
liMsgs.InitializeWithMaxHeight(page,"liMsgs",ABM.COLLAPSE_ACCORDION,500,"")
For i = 0 To mySe.myTh.lstClassThreadEl.Size - 1
Dim thEl As ThreadEl = mySe.myTh.lstClassThreadEl.Get(i)
Dim singleMessage As ABMContainer = ABMShared.BuildSingleMessage(page,mySe,i,thEl)
' page.Cell(2,1).AddComponent(singleMessage)
liMsgs.AddItem("limsgs-" & i,singleMessage)
Next
page.Cell(2,1).AddComponent(liMsgs)
For i = 0 To mySe.myTh.lstClassThreadEl.Size - 1
Dim thEl As ThreadEl = mySe.myTh.lstClassThreadEl.Get(i)
Dim singleMessage As ABMContainer = ABMShared.BuildSingleMessage(page,mySe,i,thEl)
singleMessage.Tag = "Some_Key_You_Use_To_ID_This_Record" ' can be an object....
page.Cell(2,1).AddArrayComponent(singleMessage,"MessageArray")
Next
Sub MessageArray_Clicked(Target as String)
Log(" Target: " &Target)
' You will see that the Target contains the ID of the container clicked...
' Now get the tag of the container and do what you want with selected record
End Sub
The above may substitute as a ABMList - using your Container method...
Cat Skinning - there is more than one way.... I wanted to create a configuration sheet using ABMSwitch. However, the click method does not have a (Target as String) param. Same goes for ABMCheckbox... ABMChips was used for this example since it works. I found the original example of...