Page 1 of 1

Retrieve actual position and size of gelistelement

Posted: Mon Mar 04, 2013 7:03 am
by c-tec
Hello Roger,
I try to make some additions to your designer. Works ok so far, can rearrange the gets, but how can I retrieve the actual position and size after changes through the designer ? In the getlist array the values are not updated. I actually try to get the values from the getobject

Code: Select all

aPos  := aGetlist[y,19]:currentpos() //(x,y)
aSize := aGetlist[y,19]:currentsize()
But the values do not really match the position. What is the best way to get the actual values from the getlist ?
regards
Rudolf

Re: Retrieve actual position and size of gelistelement

Posted: Mon Mar 04, 2013 7:31 am
by Tom
Try oGetListObject:DCCurrentPos()

This translates pixel values into line-col-coordinates aswell.

Re: Retrieve actual position and size of gelistelement

Posted: Mon Mar 04, 2013 8:04 am
by c-tec
Hello Tom,
thank you, now it works. I forgot that I had a SCALE 1.2 in the getoptions for testing, this has changed a lot in the size and position of the objects. After removing it, all works now, even the calculation of the label position in the other thread.
regards
Rudolf

Re: Retrieve actual position and size of gelistelement

Posted: Mon Mar 04, 2013 9:54 am
by Tom
Hi, Rudolf.

If you use the methods Roger added to all getlist objects (o:DCCurrentPos, o:DCCurrentSize, o:DCSetPos ...), they all reflect scaling and the other options - and even the line/col-translations.

Re: Retrieve actual position and size of gelistelement

Posted: Tue Mar 05, 2013 3:37 am
by c-tec
Hello Tom,
the size and position from the objects ware correct, but I read the position from the getlist objects an save them in my database for the data driven dialogs. Here I have to take rid of the scale factors, otherwise the values are wrong when I create the dialog again. But now it works, I do not need the scaling actually.
regards
Rudolf