getLocationY() of Tabpanel in Footer part

Hi,

I would like to know if I noticed a bug.

I have a tabpanel in the Footerpart of a tableview form.
When I ask the getLocationY() of the tabpanel, I get the Y-location of the the tabpanel within the footerpart and not the Y-location within the form

			_height = forms[_form].elements[i].getLocationY() ; // _height gets value 5

When I use the solutionmodel and I ask the y value of the tabpanel, I get the real height within the form

			_js_tabpanel = _js_form.getTabPanel(forms[_form].elements[i].getName())		
			_height = _js_tabpanel.y // _height gets value 425

Is this correct behavior or is this a bug (Servoy 4.1.4)?

Martin

Hi Martin

I just fell over the same bug (in Servoy 5.1 rc3), and it is a obviously a bug as the cmd is: forms[formName].elements[elementName].getLocationY().

So one is refering to the form and NOT to a part of the form.

Did you make a case in the support system?

Best regards, Robert

Robert Huber:
Hi Martin

I just fell over the same bug (in Servoy 5.1 rc3), and it is a obviously a bug as the cmd is: forms[formName].elements[elementName].getLocationY().

So one is refering to the form and NOT to a part of the form.

Did you make a case in the support system?

Best regards, Robert

Hi Robert,

No I didn’t make a case of it, because I was not sure is this was a bug.

I made a work-around for it.

But if you agree that this is a bug, please add a case.

Martin

Hi Martin

I will install Servoy 5.1 this evening and check for this problem as well and if it still exists (what I assume) I will make a case tomorrow.

Regards, Robert

Hi Martin

I found all necessary methods to get the requiered info about the y position, they are all there :-)

What I needed:

forms[formName].controller.getPartYOffset(JSPart.FOOTER) // Argument can be any part
forms[formName].controller.getPartHeight(JSPart.FOOTER)

yPosElement = forms[formName].elements[element].getAbsoluteFormLocationY()

Hope it helps, regards, Robert

Robert Huber:
Hi Martin

I just fell over the same bug (in Servoy 5.1 rc3), and it is a obviously a bug as the cmd is: forms[formName].elements[elementName].getLocationY().

So one is refering to the form and NOT to a part of the form.

Did you make a case in the support system?

Best regards, Robert

this is not a bug, that location is the actual location of the component in its container.
We cant give there the forms position of the component because then this:

forms[formName].elements[elementName].setLocationY(forms[formName].elements[elementName].getLocationY()+1);

would completely go wrong…

But as you find out we already have the methods for you that gives you the elements position in the form.

Yes, I found out you handle vertical and horizontal in the form differently, wiht an y offset to get the real y pos.

Thanks, Robert