Jump to content
Sign in to follow this  
Ealric

Get Position of a control

Recommended Posts

Ealric

I'm looking for the ability to retrieve the current position of any control in my GUI. If a control is moved I want to be able to retrieve the new position later on. The closest I can see that might work is _SendMessage..

_SendMessage($msg,$TBM_GETPOS)

However, I'm not really certain how to put it to use. I need the ability to find the position of any type of control, so there's approx. 30 controls. It needs to be a universal piece.

I've created a basic "Programmer's Desktop" that allows you to create GUIs from scratch via command prompts in the application. You can then create controls via command prompts and also move those controls anywhere in the GUI. I'm just stuck on the new retrieval position which is important as it would be used for dictating the output code which is the source people would use to build their .au3 scripts on.

With the new app I can build a GUI and new controls and move them in moments and then use the source code for the app shell.

Any help is appreciated.


My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Share this post


Link to post
Share on other sites
weaponx

ControlGetPos ( "title", "text", controlID )

P.S. I have a request in for GUICtrlGetPos()...

http://svn.autoitscript.com/trac/ticket/119

Edited by weaponx

Share this post


Link to post
Share on other sites
weaponx

Doesn't ControlGetPos() work for you ?

I'm not sure if you were asking me or not. I think its more of an organizational issue, people expect it to be called GUICtrlGet* because there are other GUICtrlGet* functions in the GUI Reference section.

Share this post


Link to post
Share on other sites
Ealric

Doesn't ControlGetPos() work for you ?

Believe it or not, I searched and searched and kept missing that function. I was looking deep in the GUI and UDFs to find something. I just missed ControlGetPos(). That will work. I expected it to be in the GUI section.


My Projects: [topic="89413"]GoogleHack Search[/topic], [topic="67095"]Swiss File Knife GUI[/topic], [topic="69072"]Mouse Location Pointer[/topic], [topic="86040"]Standard Deviation Calculator[/topic]

Share this post


Link to post
Share on other sites
graydwarf

Just FYI: Spent 10 minutes looking for something called GUICtrlGet... before giving up and searching here.

Thanks.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×