PDA

View Full Version : Anchoring a listview item to the right



volcano
22nd March 2016, 10:57
Hi All,

I have a list model with items. The list view is a horizontal listview.

If the width of the list view is less than the width of all the items, it shows a more button with a drop-down showing the remaining items.

However I need to anchor one item permanently to the right of the view, even if the items are less in the list.

Kindly advice.

anda_skoa
22nd March 2016, 11:19
Maybe add it after the list view?

Cheers,
_

volcano
23rd March 2016, 01:25
Can it be part of the list view and be anchored programmatically at runtime??

anda_skoa
23rd March 2016, 08:26
I am not sure I understand.

You said this item is always there, always to the right of the list view.
Which would make putting it into that position the most efficient solution.

If it is part of the Flickable content of the ListView, it will move.

Cheers,
_

mkreddy
25th March 2016, 11:18
Please try once by using model's index.
if you will get that item in the list always you can make a comparison based the item(ex. item name)

you can try something like this.

anchor.right: parent.right
rightMargin: conditionAboutItem ? 0 : 10

plz let me know in case if you need any further help