iOS Question CustomListView Size and Font help

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Hi,

I'm trying to reproduce some behaviour that I had in B4A in B4i.

I have a custom list view which is a list of custom views. The custom views size is dependant upon the size of its contents.
Also I need to be able to set the font using CSBuilder.

Neither seems to be working and I have run into a brick wall. Does anyone have any ideas.

IMG_0153.PNG

I have attached an example. The colours are there so that you can see the size of the elements.

Any Ideas?

Thanks
 

Attachments

  • clvtest.zip
    222.7 KB · Views: 275

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Hi Erel,

Noi, each internal item consists of 2 labels. I just wanted the second label to size to its contents over multiple lines.

What seems to be happening is that the CLV Panel is the correct size but the internal panel and the label ping back to the original size.

Also, How do I ensure that the CSBuilder text is retained by the label in the CLV. It is losing all of the styling
 
Upvote 0

Andrew (Digitwell)

Well-Known Member
Licensed User
Longtime User
Ok Problem Solved :)

First: The Layout used by the Custom List View needed some more constraints set to ensure that the size of the back panel is the maximum size of it parent. Also the size of the label needed to be adjusted in the layout script as well.

Second: To allow the fonts to be preserved, the AutoScaleAll needed to be removed from this layout.

Now works perfectly. I have uploaded the sample again for reference.

The odd thing is that the code in the first example will work fine for B4A. I Suppose this is one of those differences...
 

Attachments

  • clvtestworking.zip
    222.8 KB · Views: 326
Upvote 0
Top