<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Graeme,<div><br></div><div>debugging on (I have fallen for this many times - hate that I can set BPs w/o any visual indication that debugging itself is off)? It sure does work for me.</div><div><br></div><div>I call 2nd form like this:</div><div><br></div><div><div>procedure TForm1.BitBtn1Click(Sender: TObject);</div><div>var</div><div>&nbsp; f: &nbsp;Tform2;</div><div>begin</div><div>&nbsp; f := Tform2.Create(nil);</div><div>&nbsp; try</div><div>&nbsp; &nbsp; f.Showmodal;</div><div>&nbsp; finally</div><div>&nbsp; &nbsp; if Assigned(f) then</div><div>&nbsp; &nbsp; &nbsp; f.Free;</div><div>&nbsp; end;</div><div>end; &nbsp;</div></div><div><br></div><div>form2 has a panel with a bitbtn on it.<span style="font-size: 12pt;">&nbsp;</span><span style="font-size: 12pt;">The button's ModalResult = mrNone and Kind = bkClose. The Action</span></div>property is also empty.<div><br></div><div>BP set on 'Self.Close' line in OnClick event and debugger stops there as expected (Laz 1.4, Windows 7)</div><div><br></div><div>Cheers,</div><div>Kai<br><div><br></div><div><br></div><div><br><br><div>&gt; Date: Thu, 21 May 2015 15:52:43 +0100<br>&gt; From: mailinglists@geldenhuys.co.uk<br>&gt; To: lazarus@lists.lazarus.freepascal.org<br>&gt; Subject: [Lazarus] TBitBtn's OnClick not fired<br>&gt; <br>&gt; Hi,<br>&gt; <br>&gt; I've got a form with a panel and a TBitBtn in the panel. The button is<br>&gt; used to close the form, which is shown via ShowModal.<br>&gt; <br>&gt; I've got an OnClick event handler for the BitBtn, but when I put a<br>&gt; breakpoint in that event handler it is never reached???<br>&gt; <br>&gt; The button's ModalResult = mrNone and Kind = bkClose. The Action<br>&gt; property is also empty.<br>&gt; <br>&gt; Unfortunately there is no LCL help on the TBitBtn.Kind property, but<br>&gt; would that affect the OnClick event not being used?<br>&gt; <br>&gt; http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/tcustombitbtn.kind.html<br>&gt; <br>&gt; Clicking the button does close the modal form though.<br>&gt; <br>&gt; <br>&gt; Regards,<br>&gt;   - Graeme -<br>&gt; <br>&gt; -- <br>&gt; fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal<br>&gt; http://fpgui.sourceforge.net/<br>&gt; <br>&gt; --<br>&gt; _______________________________________________<br>&gt; Lazarus mailing list<br>&gt; Lazarus@lists.lazarus.freepascal.org<br>&gt; http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus<br></div></div></div>                                               </div></body>
</html>