Two controls having focus same time lazarus / 31-LCL ---------------------------------------------------------------------- sapper · 2014-03-19 01:42 In lazarus IDE on windows 8.1, when you click on Search>Goto Line... a form pops up and it appears that the edit box and OK button both have focus. This means you can enter your line number and then just press enter. How is this done? ---------------------------------------------------------------------- taazz · 2014-03-19 01:58 not focused it is the default button and you can also have a cancel button as well so pressing esc anywhere it would press the cancel button. ---------------------------------------------------------------------- zeljko · 2014-03-19 06:22 Button is just painted "as focused" since it's default button. Same behaviour of default button you can see on macosx cocoa. ---------------------------------------------------------------------- sapper · 2014-03-20 03:31 I looked into the IDE source code which is a bit daunting for a beginner but managed to find the form. Is it correct that setting a default button like this is only possible if a TButtonPanel is used? ---------------------------------------------------------------------- taazz · 2014-03-20 04:22 No, any button can be set as default button. ---------------------------------------------------------------------- sapper · 2014-03-22 02:27 Thanks for your help. Don't know how I missed the Default and Cancel properties for TButton.