Changing the Tab Order of controls in Open Dialog box

Hi

I am using Delphi 5. To add two new edit boxes in the Open Dialog box we have created new windows using CreateWindow and CreateWindowEx. So now four new components come on my opendialog box - 'File name', 'Files of type', 'User Name','User Password'.

Now problem is when i use tab to navigate, cursor goes from 'Files of type' to Open button. (Meaning first tab moves through the exisiting control on the open dialog box and then comes back to the new controls created by me.)

I want to change this tab order. After 'Files of type' focus should come on User name (component added by me).

How can i do this? Any comments

Rajni

Comments

  • : Hi
    :
    : I am using Delphi 5. To add two new edit boxes in the Open Dialog box we have created new windows using CreateWindow and CreateWindowEx. So now four new components come on my opendialog box - 'File name', 'Files of type', 'User Name','User Password'.
    :
    : Now problem is when i use tab to navigate, cursor goes from 'Files of type' to Open button. (Meaning first tab moves through the exisiting control on the open dialog box and then comes back to the new controls created by me.)
    :
    : I want to change this tab order. After 'Files of type' focus should come on User name (component added by me).
    :
    : How can i do this? Any comments
    :
    : Rajni
    :
    :
    You need to set the TabOrder of those controls. To be sure I suggest theat you set the TabOrder of all the controls, also the ones windoes has created for you.
  • [b][red]This message was edited by Rajni at 2004-8-5 2:16:32[/red][/b][hr]
    How can i change the tab order of the control at run time. How can i access controls of the delphi's Dialog box


  • : [b][red]This message was edited by Rajni at 2004-8-5 2:16:32[/red][/b][hr]
    : How can i change the tab order of the control at run time. How can i access controls of the delphi's Dialog box
    :
    :
    :
    In Delphi the answer to the first question is simple enough: TabOrder is an integer property of the TWinControl objects. Bu this won't help you in this case.
    In this case you need to use the method described here:
    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaskdr/html/gui46.asp
    search for "to change the tab order at run time". This requires you to know the handles of the controls. I don't know how to get those, but perhaps you can find a API call for that in the help files or on the msdn site.
  • Hey
    That works!!! :)

    Thanks a lot


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories