Retrieve actual position and size of gelistelement

This forum is for eXpress++ general support.
Post Reply
Message
Author
c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Retrieve actual position and size of gelistelement

#1 Post 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
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Retrieve actual position and size of gelistelement

#2 Post by Tom »

Try oGetListObject:DCCurrentPos()

This translates pixel values into line-col-coordinates aswell.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Retrieve actual position and size of gelistelement

#3 Post 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
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

User avatar
Tom
Posts: 1234
Joined: Thu Jan 28, 2010 12:59 am
Location: Berlin, Germany

Re: Retrieve actual position and size of gelistelement

#4 Post 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.
Best regards,
Tom

"Did I offend you?"
"No."
"Okay, give me a second chance."

c-tec
Posts: 379
Joined: Tue Apr 20, 2010 1:36 am
Location: SALZBURG/AUSTRIA
Contact:

Re: Retrieve actual position and size of gelistelement

#5 Post 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
Rudolf Reinthaler
digital pen & paper systems
http://www.formcommander.net

Post Reply