View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
[email protected] matthias.karl@gmail.com is offline
external usenet poster
 
Posts: 10
Default SetFocus in a custom dialog

On 12 Sep., 20:55, Dave Peterson wrote:
How is the focus jumping to the next control?

Are you hitting enter or tab?

There is a .tabindex property that you can use to make sure the tab/enter takes
you to the correct next control.

And there is a .tabstop property that you can use to skip any of the controls
you want.


Dave

I'm pressing the tab-key to move out of the password-field and the
focus is then set to the cancel-button.

TabIndex 0 is the label for the username-field with TabStop = False
(so that I can use the accelerator)
TabIndex 1 is the username-field with TabStop = True
TabIndex 2 is the label for the password-field with TabStop = False
(so that I can use the accelerator)
TabIndex 3 is the password-field with TabStop = True
TabIndex 4 is the Login-button with TabStop = True
TabIndex 5 is the Cancel-button with TabStop = True

Matthias