Sign in to follow this  
Followers 0
CyberSlug

Set Control Focus Immediately

5 posts in this topic

Is it possible to set the focus on an arbitrary control?

GUISetControlEx($controlref, $GUI_FOCUS) does not take effect until the GUI window loses focus and is reactivated?

ControlFocus will not work since I have a $ref instead of a classnameNN :D

(Or is there a generic GuiSendMsg that works on all control types?)


Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites



I don't really understand what is going on because it is suppose to work when the gui is showed. Can you give an example of a bug situation? THanks for your waiting. :D

Share this post


Link to post
Share on other sites

It's not a bug; it's a feature request.

When I click a certain control, I want to set focus on another control.

Here is an example workaround I am using:

If GuiMsg(0) = $myButton Then
   ControlFocus($windowTitle,"", "Edit1")
EndIf

But I do not like mixing Control-Commands with Gui-Commands....

I want something like this:

If GuiMsg(0) = $myButton Then
   GuiSetFocus($editRef)
EndIf

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

It's not a bug; it's a feature request.

When I click a certain control, I want to set focus on another control.

Here is an example workaround I am using:

If GuiMsg(0) = $myButton Then
   ControlFocus($windowTitle,"", "Edit1")
EndIf

But I do not like mixing Control-Commands with Gui-Commands....

I want something like this:

If GuiMsg(0) = $myButton Then
   GuiSetFocus($editRef)
EndIf
I see I have a look why GuiSetControlEx($ref,$GUI_FOCUS) will not work.

I have a lot of trouble to keep insync the focus specially with button.

I hope i will be more easy that I think. :D

stay tune

Share this post


Link to post
Share on other sites

I think I have a solution in the next 102.23 of GUI :D

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  
Followers 0