Setting X & Y coordinates....

Hi All,

I have a HorizontalLayout which I have set an image via CSS. (pls see the squared area in the attached picture)
Then I have 3 buttons styled as links & namely link1, link2 & link3.

I used the method
setComponentAlignment(Component childComponent, int horizontalAlignment, int verticalAlignment)
to set the X & Y positions. But the problem is that method doesn’t add those links to the places I want.

All I can use is those pre-defined Alignment values & they don’t cater my needs.

Any help is greatly appreciated.
Thanks in advance.

Cheers,
Asela.
11786.png

How do you want to align the links? You may take a look at setExpandRatio to manage the relative width of each of the links in an expandable area.

Hi,

Thanks for the reply. I do not wish to set an expand ratio between my links.
All I need is to set a link to where ever I want.

Meaning: I don’t want to use Alignment.TOP_CENTER, Alignment.BOTTOM_RIGHT… etc.
I want to give X & Y coordinates to the link & set the link to any place in that Layout.

Thanks.

If that is what you want, then it’s better to use AbsoluteLayout instead of HorizontalLayout