[Lazarus] TBitBtn's OnClick not fired

K. P. platysternon at hotmail.com
Thu May 21 18:52:02 CEST 2015


Hi Graeme,
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.
I call 2nd form like this:
procedure TForm1.BitBtn1Click(Sender: TObject);var  f:  Tform2;begin  f := Tform2.Create(nil);  try    f.Showmodal;  finally    if Assigned(f) then      f.Free;  end;end;  
form2 has a panel with a bitbtn on it. The button's ModalResult = mrNone and Kind = bkClose. The Actionproperty is also empty.
BP set on 'Self.Close' line in OnClick event and debugger stops there as expected (Laz 1.4, Windows 7)
Cheers,Kai




> Date: Thu, 21 May 2015 15:52:43 +0100
> From: mailinglists at geldenhuys.co.uk
> To: lazarus at lists.lazarus.freepascal.org
> Subject: [Lazarus] TBitBtn's OnClick not fired
> 
> Hi,
> 
> I've got a form with a panel and a TBitBtn in the panel. The button is
> used to close the form, which is shown via ShowModal.
> 
> I've got an OnClick event handler for the BitBtn, but when I put a
> breakpoint in that event handler it is never reached???
> 
> The button's ModalResult = mrNone and Kind = bkClose. The Action
> property is also empty.
> 
> Unfortunately there is no LCL help on the TBitBtn.Kind property, but
> would that affect the OnClick event not being used?
> 
> http://lazarus-ccr.sourceforge.net/docs/lcl/buttons/tcustombitbtn.kind.html
> 
> Clicking the button does close the modal form though.
> 
> 
> Regards,
>   - Graeme -
> 
> -- 
> fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
> http://fpgui.sourceforge.net/
> 
> --
> _______________________________________________
> Lazarus mailing list
> Lazarus at lists.lazarus.freepascal.org
> http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150521/9bc19664/attachment-0003.html>


More information about the Lazarus mailing list