[Lazarus] Button Default not working in IDE dialog
mailinglists at geldenhuys.co.uk
Fri Mar 20 08:33:59 CET 2015
In the Condition Defines dialog (ide/condef.pas) the btnOK has the
Default = True property set, yet when I trigger the dialog in the IDE
via Ctrl+Shift+D (while programming) and simply hit ENTER (because the
default selection is correct) the dialog closes but the btnOK onclick
was never trigger - thus no conditional define was added to my source
code. It's as if the cancel button was clicked.
Why doesn't the Default = True work?
I had to mod the condef.pas unit by doing the following to get the
"simply press ENTER" to function.
procedure TCondForm.FormShow(Sender: TObject);
if SecondTest.Items.Count < 10 then
btnOK.SetFocus; // <<<<--- New line added
- Graeme -
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
More information about the Lazarus