Jump to content

Can someone explain this tab anomaly?


Recommended Posts

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?

Link to comment
Share on other sites

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!
Link to comment
Share on other sites

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
Link to comment
Share on other sites

  • Moderators

Have you looked at GUISetFont()?

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.

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...