tags:

views:

126

answers:

2

hi,

I'm using as container for my LinkButtons.

I would like to know

1) how can I remove the space between the items in my Tile container.

2) how can I set dynamic width for my items (at the moment they all have the same width regardless the width of the included component)

3) how can I avoid to display scrollbars if the items are not included in the container

Thanks

A: 

1) Space between items is set by horizontalGap and verticalGap, so to remove them completely use

horizontalGap="0" verticalGap="0"  

Keep in mind that you need the size of all objects to be the same for it to work properly.

2) What do you mean exactly? If you only need to change the width of the objects, what's wrong with doing btnId1.width = 200;?

3) To cancel the scroll bars use

horizontalScrollPolicy="off" verticalScrollPolicy="off"
modz0r
hi thanks for reply. Point (1): I didn't solve yet. But I guess because the objects are displayed in a kinda of grid.. so it doesn't matter the gaps: http://dl.dropbox.com/u/72686/Tile.png
Patrick
Point(2): As you can see from the last picture, the items have different sizes.. so I don't want a fixed width. Is this possible in a Tile component ? If not, what should I use instead ? thanks
Patrick
As far as I know, you need the objects to be in same sizes to make the gaps completely off, else it will "change" the width of all objects to the largest one.I can't see from the picture what exactly do you mean in question 2.
modz0r
The children items have not the same width. Because the labels are strings of different length. So, my question is: how can I set a not-fixed width for the items ? Now in the picture, you can see they are all aligned, because the Tile component set them the same width I guess. If I use a HBox, this is not longer true (they just stay adjacent to each other, but I cannot have more than 1 row).
Patrick
The items are added dynamically (and I don't know how many they are) so I cannot create more than one row with HBox, that's why I'm using a Tile component.
Patrick
I see. Well, I can't think of any way better doing this.. sorry.
modz0r
ok, I will check if I can eventually use other containers. thanks
Patrick
A: 

Did you ever find a resolution to this?

I am facing the same issue. An HBox acts exactly as I want but won't span over multiple lines.

James