<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> f: Tform2;</div><div>begin</div><div> f := Tform2.Create(nil);</div><div> try</div><div> f.Showmodal;</div><div> finally</div><div> if Assigned(f) then</div><div> f.Free;</div><div> end;</div><div>end; </div></div><div><br></div><div>form2 has a panel with a bitbtn on it.<span style="font-size: 12pt;"> </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>> Date: Thu, 21 May 2015 15:52:43 +0100<br>> From: mailinglists@geldenhuys.co.uk<br>> To: lazarus@lists.lazarus.freepascal.org<br>> Subject: [Lazarus] TBitBtn's OnClick not fired<br>> <br>> Hi,<br>> <br>> I've got a form with a panel and a TBitBtn in the panel. The button is<br>> used to close the form, which is shown via ShowModal.<br>> <br>> I've got an OnClick event handler for the BitBtn, but when I put a<br>> breakpoint in that event handler it is never reached???<br>> <br>> The button's ModalResult = mrNone and Kind = bkClose. The Action<br>> property is also empty.<br>> <br>> Unfortunately there is no LCL help on the TBitBtn.Kind property, but<br>> would that affect the OnClick event not being used?<br>> <br>> http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/tcustombitbtn.kind.html<br>> <br>> Clicking the button does close the modal form though.<br>> <br>> <br>> Regards,<br>> - Graeme -<br>> <br>> -- <br>> fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal<br>> http://fpgui.sourceforge.net/<br>> <br>> --<br>> _______________________________________________<br>> Lazarus mailing list<br>> Lazarus@lists.lazarus.freepascal.org<br>> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus<br></div></div></div>                                            </div></body>
</html>