Forum > IDE/CodeTools

Declare Variable IDE tool default button

<< < (2/2)

JuhaManninen:

--- Quote from: dsiders on July 29, 2023, 03:45:27 am ---His complaint is that the Help button is always the first one in the tab order for keyboard navigation.

--- End quote ---
Yes I know. To fix it he removed the Help button from ShowButtons set. It is OK but I am interested in the actual reason for this bug. That's why I asked if somebody could reproduce it with a simple example project. I will do it later myself if nobody else does.


--- Quote ---See the UpdateButtonOrder method for the panel.

--- End quote ---
That deals with ButtonOrder which can also be set in OI. It does not affect the default button. There is DefaultButton property for that. In DeclareVarDlg it is pbOK, thus the OK button should be default.

n7800:
The "default" button is the button that will be automatically pressed when [Enter] is pressed. Of course, if at this moment the focus is not on the component, which itself reacts to [Enter]. And since the tab order in this dialog starts from the TButtonPanel, the Help button is selected first (from left to right, as needed).

I fixed the tab order and set ActiveControl to TEdit. The default focus is now on the type input field, and pressing [Enter] activates the default button OK.

JuhaManninen:
I finally noticed the patch and applied it. Thanks.

Navigation

[0] Message Index

[*] Previous page

Go to full version