cappy2112 Posted January 8, 2006 Posted January 8, 2006 I've setup a few controls in a GUI, but then found out the default PixelCoordMode is 1, which is relative to the full screen. I thought it would be easier to make the control coordinates relative to the client part of the window, since the gui is very small and will be centered in the screen. After setting opt("PixelCoordMode", 2), I was surprized to see my controls in exactly the same place as before I added the opt("PixelCoordMode",2) call. I don't understant why this is
Moderators SmOke_N Posted January 8, 2006 Moderators Posted January 8, 2006 I've setup a few controls in a GUI, but then found out the default PixelCoordMode is 1, which is relative to the full screen.I thought it would be easier to make the control coordinates relative to the client part of the window, since the gui is very small and will be centered in the screen.After setting opt("PixelCoordMode", 2), I was surprized to see my controls in exactly the same place as beforeI added the opt("PixelCoordMode",2) call.I don't understant why this isWhy would you think that Opt('PixelCoordMode', 2) << would affect your control position when it deals with 'pixel'coord'' locations? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
cappy2112 Posted January 8, 2006 Author Posted January 8, 2006 (edited) Why would you think that Opt('PixelCoordMode', 2) << would affect your control position when it deals with 'pixel'coord'' locations?From the help fileSets the way coords are used in the pixel functions, either absolute coords or coords relative to the current active window:0 = relative coords to the active window1 = absolute screen coordinates (default)2 = relative coords to the client area of the active windowIt implies to me that the coordinates are relative to a different window- the screen window, vs the application form window.50 pixels away from the edge of the screen is different than 50 pixels away form the edge of a dialogue or the application window, right ?I think I found my answer-> GUICoordMode???I don't know which API's PixelCoordMode is for, but it seemed like it could be used for positioning any GUI component. THat is, until I found this, by accident -> GUICoordMode.THis seems more appropriate Edited January 8, 2006 by cappy2112
Moderators SmOke_N Posted January 8, 2006 Moderators Posted January 8, 2006 From the help fileSets the way coords are used in the pixel functions, either absolute coords or coords relative to the current active window:0 = relative coords to the active window1 = absolute screen coordinates (default)2 = relative coords to the client area of the active windowIt implies to me that the coordinates are relative to a different window- the screen window, vs the application form window.50 pixels away from the edge of the screen is different than 50 pixels away form the edge of a dialogue or the application window, right ?I think I found my answer-> GUICoordMode???I don't know which API's PixelCoordMode is for, but it seemed like it could be used for positioning any GUI component. THat is, until I found this, by accident -> GUICoordMode.THis seems more appropriateGlad you found your answer... but also look at what you typed ... and I'm sure you'll see why the first option wasn't the answer. Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now