PDA

View Full Version : Positioning image relative to anothers position


perion
01-14-2005, 12:39 PM
I have two images ("gif" files), a large image and a smaller one. I'd like to position the second (smaller) image so that it's bottom right corner is pegged to the bottom right corner of the larger one. And I'd prefer it, if I didn't have to have prior knowledge of the images' sizes. Any suggestions, thoughts, or pointers to documentation?

Thanks,

:Paul

p.s., This is probably a very simple thing to do, but I haven't quite figured Laszlo out yet ...

perion
01-14-2005, 03:56 PM
Following is something that works ... but if there's a better way of doing it (more efficient, or whatever); please feel free to tell me <view name="frame" resource="../images/big.gif">
<view resource="../images/small.gif"
x="${immediateparent.width - this.width}"
y="${immediateparent.height - this.height}" >
</view>
</view>Thanks,

:Paul

perion
01-20-2005, 09:42 AM
And this appears to be another way: <view name="frame" resource="../images/big.gif">
<view/>
<view/>
<view resource="../images/small.gif" />

<stableborderlayout axis="x" />
<stableborderlayout axis="y" />
</view>Does anyone have an idea as to which is the better approach?

Thanks,

:Paul