I am trying to find out if a locked text field is within the boundaries of a graphic.
I am using drag and drop functionality.
If the locked text field is placed slightly outside of the graphic I want to move it so it lies within the graphic.
The problem I have is that when I check the location of the locked text field I get very odd numbers. Even when I nudge the field right up to the edge of the graphic the numbers don't always match up.
I have put the following into the dragDrop handler of the graphic to allow me to see something of what is going on
Code: Select all
if the dragDestination is not empty then
if the topleft of the dragSource is not within the rect of the dragDestination then
put the short id of the dragSource & ":TOPLEFT SOURCE " & the topleft of the dragSource & "| " & the short id of the dragDestination & ": TOPLEFT DESTINATION " & the topleft of the dragDestination
This isn't making any sense to me since I would have thought the topLeft of the field would have to be something close to the topleft of the graphic. And it simply is not.1006:TOPLEFT SOURCE 359,49| 1025: TOPLEFT DESTINATION 14,218
The only thing that can be happening is that the field is referencing it's zero point from a different referent. Is that possible. I thought all the controls on a card referenced to the topleft and bottomright of the card rect?
I am using a dual screen extended display but I would have thought all this location stuff was internal to the card/stack location.
Any thoughts?