Sign in to follow this  
Followers 0
Bokkie

Can someone explain this tab anomaly?

6 posts in this topic

Can someone run the attached file for me? Tab your way through the controls. When the exit button gets the focus it needs two tabs before the focus gets to the top input field but no control gets the focus. I'm wondering if the label at the top left next to the input field it is getting the tab as well? If that's the case is it possible to suppress it so the focus passes immediately from the exit button to the input field?

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

By adding the line ToolTip( ControlGetFocus($mainForm) , 0,0 ) inside the while-loop, we can tell that Button10 gets focus.... and this corresponds to this control:

$exitApplication = GUICtrlCreateButton("E&xit workbench", 224, 365, 170, 25, 0)

Get rid of the $exitApplication control and there are no problems

EDIT: Or you can make your window taller so that the mystery button isn't cut off...

Edited by CyberSlug

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

#3 ·  Posted (edited)

By adding the line ToolTip( ControlGetFocus($mainForm) , 0,0 ) inside the while-loop, we can tell that Button10 gets focus.... and this corresponds to this control:

$exitApplication = GUICtrlCreateButton("E&xit workbench", 224, 365, 170, 25, 0)

Get rid of the $exitApplication control and there are no problems

EDIT: Or you can make your window taller so that the mystery button isn't cut off...

Thanks slippery slug!

That control was leftover from earlier and I thought I'd deleted the offending button but I guess it got buried under the group panels. I like the tooltip snippet. Very useful!

BTW: is there an easy way to set the font so that all controls use it? The code that was generated used a font assignment for each control which means there's a lot of duplication. Maybe i can set the font once and let it apply to all unless I change it to something else?

Edited by Peter Hamilton-Scott

Share this post


Link to post
Share on other sites

Have you looked at GUISetFont()?


[center]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.[/center]

Share this post


Link to post
Share on other sites

Have you looked at GUISetFont()?

Yup! That works perfectly. I guess you seasoned campaigners get fed up with stoopid noobie questions!

Share this post


Link to post
Share on other sites

An alternative tooltip that could have been added to the "Case Else":

If $msg > 0 Then ToolTip(GuiCtrlRead($msg), 0,0)

When you tab to the mystery control and hit space, you get the button's name :o


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

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