Question

Is there a way to tell what is the current location of my editor on the screen? Also acceptable would be a way to tell what is the current location of an editor within the traitsui window in which it is situated.

The use case is this: I am trying to make movies from mayavi views (and I don't care if it is a bit of a hack). Digging around in the code, there are some low level idiosyncracies that make it very difficult to actually get mayavi to do this nicely. But, one option is to just use X11 grabbing -- which is fairly hacky but for now suits my purposes. This depends on the relative position of the mayavi scene within the traitsui window, which is by the design of traitsui completely not transparent to the programmer.

Was it helpful?

Solution

I found it eventually:

x,y=editor.control.GetScreenPosition()
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top