Position of field on screen

Bastiaan Olij bastiaan at basenlily.me
Thu Aug 28 00:07:00 EDT 2014

Hi Kim,

Nope, those only give me the position of the field within its current
container, so if I want the position on screen I would have to add the
left and top position of its container, and its container, and possibly
traverse further down, and then the window, and add any top/left
toolbars, take into account scrollbar positions of the various
containers, take into account any container that is a tabpane, take into
account the size of borders of all the containers, not to mention that
those sizes change depending on the OS and that certain things have a
size that can change depending on content without Omnis providing me
with that info (tab panes with a double row of headers for instance).

I've written such logic before but it is a dog to maintain whenever a
new OS comes out. It would be so neat to just have a function that gives
me the screen coordinates of a field. I was hoping that someone found a
way to do so. I know there is a function in the XCOMP SDK that allows me
to get to this info if I provide it with the HWND of the field (I may
add such a function to my external if all else fails) but I find it hard
to believe it is not part of Omnis somewhere.



On 28/08/14 1:32 PM, Kim Sumner wrote:
> Hi Bas
> $cfield.$top & $cfield.$left will give you coordinates location within
> $cwind
> Regards
> Kim Sumner
> Corporate Windows Pty Ltd, AUSTRALIA
> Tel:    + 61-3-5338-8232
> Mobile: 0419-561-496
> Skype:  corpwin
> Web:    http://www.corporate-windows.com
> -------------------------------------------------------------------
> WebPublisher Studio - Share your data with the World
> http://www.webpublisherstudio.com
> -------------------------------------------------------------------

More information about the omnisdev-en mailing list