Graphic Coordinates


#1

How can I open a dialog window that is “pinned” to a form window like a dialog sheet? Or, how can I get the dialog window to open relative to a form window that is being displayed on a second monitor? I have tried this.

object “PeopleSearchButton”
opendialog “SmallSearchWidget”,“Rectangle”,xytoxy(objectinfo(“rectangle”),“s”,“w”),“Titlebar”,“no”

and it is not working, it ends up on the first monitor, upper left corner.


#2

It seems Panorama does not recognize a second monitor. If I have a form open on my second monitor with a button that triggers a simple message statement it will open that message dialog on the far left side of the first monitor instead of centered in the second monitor.

Note: a dialog sheet will open on the proper form in the second monitor.


#3

You should use opendialogsheet, not opendialog.

Though actually I would strongly urge using rundialog with the sheet=true option. This is how all of Panorama’s own sheet dialogs are done (find/select, morph, sort, etc.)


#4

Understood, but I don’t want the sheet, I just want it to be form relative. Is it possible?


#5

You should be able to open a form in any position on any monitor. It won’t be “pinned”, though – moving the underlying form will not move the new form.

If you want the new form to be positioned relative to a visible form, just use windowinfo( to get the rectangle of the visible window in global coordinates, then adjust as needed with rectanglecenter(, rectangletweak(, etc.


#6

This does not appear to be the case. If I use a negative value for the left position it will open the form at the 0 position on the main monitor instead of the requested positon on the second monitor. I had a form open on the second monitor and using getwindow I got 71,-951,724,845 returned with -951 the left position. If I then have a button on that form with code to open a second form at the same coordinates it will instead open it on the far left edge of the main monitor. Looks like a bug to me.


#7

Ok, some further information which will clear this up. I had Panorama X set to “Desktop on Display 1” under the Options of the Panorama X dock popup. Once I set it to “All Desktops” it would work properly and open the second form on the second monitor as requested.

image

Evidently there are certain restrictions when using specific desktops in OS X. I wonder if Steve also has Panorama X set to a specific desktop.


#8

Hi Gary,

I will check it out and let you know.

Thanks


#9

I’d never noticed that option before. On all of my software it is set to None.


#10

If you have more than one desktop on one monitor, you can set which desktop it appears in with that option.