Hello Guys
Im using a [Scroll-less] TileList for displaying images. I attached an ArrayCollection as a dataprovider.
I want that TileList will resize its height on RunTime, according to the number of Images (as i dont want Scrollbars but Its Height).
Please guide, how can i do that
Thanks in advance.
Lemme ask... you have a "stacked list" that builds within a field and sometimes your list - let's say if it's 5 lines instead of 4 - that 5th line might be obscured?
Yes, It shows only 4 rows and the rest is hidden, i use mouse middle button to scroll the whole list [as scrollpolicy is off]
i want to change its heigh according to the images.
e.g. if there are 10 rows and each image heigh is 100px then Tilelist should resize its height according to rows/images
which will be 100x10 = 1000 height.
Without seeing your code, you could have used a few methods... for instance, I ran into an incident where I was using a ViewStack, and within that ViewStack, I had a Canvas (hidden unless it returned results via ArrayCollection) that had a ButtonScrollingCanvas, within it a HBox, that held my Repeater and I treated each return as a LinkButton.
Each LinkButton would use the Repeater.currentItem as String to fill the "box", then scale the height which as set as simply "100%" and set my variableRowHeight="true".
It "worked", I could still trip it up by providing data in just one repeater within that ButtonScrollingCanvas as one line - all my returns had to be expanded to two lines to avoid that.
I do remember that being a problem.
Care to snip/paste that bit of code around your return results perhaps?
You're locking each Image (port{data.src}) to 75 max height, no? your myTileList acts a bit differently when you change the height to 100%, no?
I'm only able to fake an array coming in to this - I pointed to a few pictures, but I grabbed the entire VBox and wrapped it into a Canvas, which I allowed to add a scroller to.
Gimme a moment on this one though. I just got handed some other work that needs to be pushed out.
Now this is a whole new question and should be a thread of it's own.
No one will find it here to help.
At that issue though, I think that you need to make a "display" component, say a modified canvas, that allows you to layout your renderer instances and then recalculate its own height. This is done by overriding the protected function 'measure' .... and most likely the 'updateDisplayList' too.
But first move this to a new thread/question and appropriately title it.
You can copy this link and reference it from your new thread if needed.