Tue Apr 21, 2020 4:42 pm by bob
To position the Window on a monitor, the Window position needs to have negative values, as the Monitor is relative to the 0,0 point for Monitors, of which 0,0 is the top left of the the Primary Monitor of Windows (the OS), and the Window get displayed according to position relative to 0,0, and thus in order to be on a monitor left of the primary, it gets negative positioning. This is for the Window itself, and not what is WITHIN the Window.
Everything displayed WITHIN a Window is laid out relative to the Window's top left, and top left of that Window is 0,0, regardless of what monitor it is on. Simply, the Window is a container, and stuff within the container doesn't care where the Container is, just whereabouts WITHIN the container it should be
So, Window is at -1920, 0 on a set of Monitors, so it is left of the Primary Monitor by 1920 pixels.
Then anything, like a button, within that Window is positioned from the top left of that Window, which for the internals of that Window, top left is 0,0.
Items displayed within a given Window give not one toss about where on the monitors they are, only within that Window. If they cared about the monitor positioning, then when you dragged your Window from one monitor to another, the buttons and text boxes would slide right off as they stayed on the monitor they were created on. Seems bad, so they only care about their positioning WITHIN the Window they are displayed in, and thus each Window has a top left of 0,0.
Go further, and create a button on that window. It also has a top left, and if you displayed some text on that button, it's positioning is relative to the top left of the Button, which again, for things WITHIN the button, top left is 0,0 of the Button. Not the Window the button is in, and not the Monitors.
So, when displaying things within a Window, they will never have a negative position unless they are not being displayed.
Think of it another way. Your seat on a plane has a seat number. That seat number is in the same position within the plane, regardless of which country, or bit of airspace that plane is in. Same with elements WITHIN a Window. They care where they are WITHIN the Window, and not on which monitor they are on. This is handled by each container restarts positioning for elements within the container from 0,0, which is the top left of the container.