Jump to content

Set Control Focus Immediately


Recommended Posts

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!
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!
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

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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...