Jump to content

[NEED HELP] moving cursor using TAB between GuiCtrlCreateInput


Recommended Posts

Let say I have few GuiCtrlCreateInput

$a = GuiCtrlCreateInput("", 150, 100, 400, 20)

$b = GuiCtrlCreateInput("", 150, 150, 400, 20)

$c = GuiCtrlCreateInput("", 150, 200, 400, 20)

$d = GuiCtrlCreateInput("", 150, 250, 400, 20)

The cursor is now at $a. I want if user press TAB, the cursor move to $c and then $d and then $b

Is there anyway to do this ?

Thanks :oops:

Link to comment
Share on other sites

I use a bunch of for/next spindles to create controls for a database of hotkeys and functions. I wrote the first version of the main application dialog fairly elegant and wanted to keep it that way, but as a user I noticed the tab order sucked. I looked for a way to explicitly set the tab order. So that I could create the dialog with the original function then reset the tab order with a separate function. I never found a way to do that with AutoIT. The tab order to the best of my knowledge is the order in which the controls are created. I just had to make sure I created the controls in the order that I wanted tab to function. I was frustrated at first, but now that I have it working the way that I want; I suppose it's better with one less function. It's pretty much the same thing in the end.

Edited by Xandy
Link to comment
Share on other sites

{snip}

This, really, because elegant code that the user never sees means absolutely nothing to the user that can't effectively use the program. Sometimes, you have to kludge for usability.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

Just test it a bit. If you change the order you create them in, it will change the tab order.

$a = GuiCtrlCreateInput("", 150, 100, 400, 20)
$c = GuiCtrlCreateInput("", 150, 200, 400, 20)
$d = GuiCtrlCreateInput("", 150, 250, 400, 20)
$b = GuiCtrlCreateInput("", 150, 150, 400, 20)

Thanks :oops: But this is not I wanted, I dont want to change to order of the code :bye:
Link to comment
Share on other sites

Thanks :oops: But this is not I wanted, I dont want to change to order of the code :bye:

Sorry ... but that's what you're going to have to do. That's the ONLY way. No two questions asked. No other anwsers. Period. End of thread. If it bothers you that much, just change the name of the freekin' variables so it reads

$a = GuiCtrlCreateInput("", 150, 100, 400, 20)
$b = GuiCtrlCreateInput("", 150, 200, 400, 20)
$c = GuiCtrlCreateInput("", 150, 250, 400, 20)
$d = GuiCtrlCreateInput("", 150, 150, 400, 20)

See what I did there? Problem solved.

What part of the phrase, "USER" interface do you not understand? It's a "USER" interface ... not a "PROGRAMMER" interface.

Edited by Blue_Drache

Lofting the cyberwinds on teknoleather wings, I am...The Blue Drache

Link to comment
Share on other sites

If the reason that you don't want to change the designed order is that you want to be able to alter the tab order at run time then the way you have to do that is to delete the controls and then create them again in the required tab order using the same variable names of course.

If you use Koda to create your forms then you will find that setting the tab order simply changes the order of creation.

I think the tab order is determined by the creation order because that's the way Windows works, and I think that when I use Delphi for example and change the tab order of a set of controls, then all Delphi does behind the scenes is to change the creation order.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
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...