Moving a seperate button with a fixedlist
#1
So I'm trying to add a button to the right of the content in a fixed list, but as the items move left/right I would like the button to move also - I'm trying to make it look like its part of the list, on the end.

I can get the button to move by adding

PHP Code:
<visible>!Container(8000).OnNext</visible>
<
animation effect="slide" start="0,0" end="-245,0" time="350" reversible="false">Visible</animation

However this snaps back into it's original position each time, what I want the button to do is move left 245px when you go to the next item and right 245px when you go to previous. If I was using a normal list I could probably use Container(8000).Column(id) to define the buttons position, but as its a fixed list the column is always 1. I thought perhaps I could use Container().Position() but this value is empty. I also can't use Container().HasFocus() because the list is being filled dynamically.

Is there any magical way with conditions, etc I can get this to work?
 
Reply
#2
If you're using I* then -
Code:
Container(id).CurrentItem
Reply
#3
I wasn't using I*, but will try it out.
 
Reply
#4
Its working beautifully. Thanks for the help Hitcher!
 
Reply
#5
If you want to do it for Helix you could also use:
Code:
IsEmpty(Container(8000).ListItemNoWrap(offset).Label)

This will check if there is an item at the offset position. You can then have multiple slide conditions to slide by each additional amount.
e.g. If there are five visible items in the list:
Code:
<animation effect="slide" end="-245,0" time="350" condition="IsEmpty(Container(8000).ListItemNoWrap(4).Label)">Conditional</animation>

<animation effect="slide" end="-245,0" time="350" condition="IsEmpty(Container(8000).ListItemNoWrap(3).Label)">Conditional</animation>

<animation effect="slide" end="-245,0" time="350" condition="IsEmpty(Container(8000).ListItemNoWrap(2).Label)">Conditional</animation>

<animation effect="slide" end="-245,0" time="350" condition="IsEmpty(Container(8000).ListItemNoWrap(1).Label)">Conditional</animation>
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#6
Nice solution.
Reply
#7
(2015-02-13, 02:56)jurialmunkey Wrote: If you want to do it for Helix you could also use:
Code:
IsEmpty(Container(8000).ListItemNoWrap(offset).Label)

This will check if there is an item at the offset position. You can then have multiple slide conditions to slide by each additional amount.
e.g. If there are five visible items in the list:
Code:
<animation effect="slide" end="-245,0" time="350" condition="IsEmpty(Container(8000).ListItemNoWrap(4).Label)">Conditional</animation>

<animation effect="slide" end="-245,0" time="350" condition="IsEmpty(Container(8000).ListItemNoWrap(3).Label)">Conditional</animation>

<animation effect="slide" end="-245,0" time="350" condition="IsEmpty(Container(8000).ListItemNoWrap(2).Label)">Conditional</animation>

<animation effect="slide" end="-245,0" time="350" condition="IsEmpty(Container(8000).ListItemNoWrap(1).Label)">Conditional</animation>

This is so nearly perfect, the only problem is a slight delay before the button moves, so its never quite in sync with the list. Is this something that can be removed? If not I'll just set the scrolltime to 0 so it's always in sync but ideally I'd like it scroll.
 
Reply

Logout Mark Read Team Forum Stats Members Help
Moving a seperate button with a fixedlist0