Digital Workshop

Welcome to the Digital Workshop Message Boards
It is currently December 23rd, 2024, 11:35 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Frame Positions when getting x co-ord are not correct?
PostPosted: December 12th, 2008, 8:27 pm 
Offline

Joined: December 12th, 2008, 8:14 pm
Posts: 4
Good evening everyone. I've got an incredibly weird issue at the moment with some frames.

I am using FrameName.GetXPosition() and it's returning 125. However, if I put a button at the same positon of the frame, it comes back as position 10?

In the designer the frames left position is 10, as it the temporary button I created.

I've tried running the publication in window and fullscreen to see if it was a screen resolution problem, but the x position of the frame still stays at 125 instead of10?

To reproduce this on my machine, all I need to do is the following:

Create a new publication with a new page.
Add a frame to the page
On load of the page, use Debug.trace(FrameName.GetXPosition()).

I have also used GetPosition().x as well, and that also returns the same result.

Look forward to hearing back from you.

Regards,
Dan.


EDIT: By the way, my frame is on a master page, and the temporary button I created is sitting directly on the page, just like the frame is.


Top
 Profile  
 
 Post subject:
PostPosted: December 13th, 2008, 1:09 am 
Offline
Godlike
Godlike

Joined: November 12th, 2005, 1:56 am
Posts: 1474
Location: SFBay Area
Opus: OpusPro v9.0x, & Evol.
OS: Vista32
System: Core 2 duo 2Ghz, RAM 3GB, Nvidia Go 7700 - laptop
That's puzzling.

The getposition works with x,y centers of course. You can verify Object position while in the Editor. Look at the status bar at bottom... it will show something like (mid 55, 140) for the center of object hovered-over.
If you want other 'measures', look at GetObjectDimensions() or other commands.


I did a quick test of getpos_Frame = Frame_5.GetPosition().x ...works fine, correct.

You can post your sample pub ( .imp ) so we see what you're seeing.

_________________
_good things come to those who wait(0)_


Top
 Profile  
 
 Post subject:
PostPosted: December 13th, 2008, 9:56 am 
Offline
Godlike
Godlike
User avatar

Joined: March 21st, 2007, 10:44 am
Posts: 3188
Location: UK
Opus: Evolution
As Lar says - it gets the centre of the object.

Either do some maths with getwidth or use GetObjectDimensions().left.

Mack

_________________
When you have explored all avenues of possibilities, what ever remains, how ever improbable, must be the answer.

Interactive Solutions for Business & Education
Learn Anywhere. Learn Anytime.

www.interaktiv.co.uk
+44 (0) 1395 548057


Top
 Profile Visit website  
 
 Post subject:
PostPosted: December 13th, 2008, 10:52 am 
Offline

Joined: December 12th, 2008, 8:14 pm
Posts: 4
Thanks guys, I was very happy to get the answer as soon as I woke up (I forgot it was the middle position! Silly me)!

I'm now using GetObjectDimensions().left for simplicity.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: No registered users and 23 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group