Relative positioning?
#1
Hi

How do I place (posx, posy) ie. an image control relative to another control (a focused item in a list)?

I'm doing an image popup when I do 'onleft' on an focused item in a list control.

I would like the popup image to be seperate from the list control.
Reply
#2
aren't posx and posy sort of deprecated? They still work, but I think left,right,top,bottom is the new way to position things, and at least these allow procentual values IIRC (probably posx and posy as well)
Reply
#3
Usually with a slide animation based on the container position.
Reply
#4
(2014-07-30, 18:07)Hitcher Wrote: Usually with a slide animation based on the container position.

Thanks for the reply Hitcher,

Could you give a quick example, I'm not entirely sure what you mean?
Reply
#5
PHP Code:
<control type="image">
    [...]
    <
animation effect="slide" end="50" time="0" condition="Container(id).Position(1)">Conditional</animation>
    <
animation effect="slide" end="100" time="0" condition="Container(id).Position(2)">Conditional</animation>
    <
animation effect="slide" end="150" time="0" condition="Container(id).Position(3)">Conditional</animation>
    ...
</
control
Image
Reply
#6
(2014-07-31, 18:14)`Black Wrote:
PHP Code:
<control type="image">
    [...]
    <
animation effect="slide" end="50" time="0" condition="Container(id).Position(1)">Conditional</animation>
    <
animation effect="slide" end="100" time="0" condition="Container(id).Position(2)">Conditional</animation>
    <
animation effect="slide" end="150" time="0" condition="Container(id).Position(3)">Conditional</animation>
    ...
</
control

Thanks a lot!

It seems to work like I want it to.
Reply
#7
(2014-07-30, 18:00)da-anda Wrote: aren't posx and posy sort of deprecated? They still work, but I think left,right,top,bottom is the new way to position things, and at least these allow procentual values IIRC (probably posx and posy as well)

Well then...

I'm just starting out skinning and all the documentation tells you to use posx and posy.

Sorry to hijack the thread but I think it might need to be addressed.
Reply
#8
(2014-07-30, 18:00)da-anda Wrote: aren't posx and posy sort of deprecated? They still work, but I think left,right,top,bottom is the new way to position things, and at least these allow procentual values IIRC (probably posx and posy as well)
posx and posy allow the use of % also. posx=left and posy=top in the majority of cases (right aligned labels is the exception iirc). Basically, you have to either choose to use posx,posy,width,height OR left,right,top,bottom.

The left,right method makes it much easier to align things consistently because you don't need to calculate the width, but you know old dogs and new tricks...
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply

Logout Mark Read Team Forum Stats Members Help
Relative positioning?0