[lazarus] Bug: Setting checkbox.checked triggers onclick

Tony Maro tony at maro.net
Mon Mar 24 09:06:14 EST 2003


Well my current workaround was just to disable the save button
immediately after loading the data into the checkbox, so it's not the
end of the world if it's a GTK / QT issue.

Thanks,
Tony

On Mon, 2003-03-24 at 02:28, Michael Van Canneyt wrote:
> On 23 Mar 2003, Tony Maro wrote:
> 
> > It's not _supposed_ to do that is it?
> 
> Let's say that it doesn't do that in Delphi.
> 
> >
> > I'm trying to detect when a user checks the box so I can enable a save
> > button, but if I change from one record to another and programmatically
> > set the .enabled property it triggers the onclick event for the
> > checkbox.
> 
> This is a good point, which depends actually on the toolkit used.
> Personally, I think that the event 'OnClick' should be separated out in
> 'OnClick' (clicked by user) and 'OnChange' (State of checkbox changed)
> But this will give compatibility problems.
> 
> If I recall correctly, Kylix has the same problem because Qt handles
> it differently from native Win32.
> 
> Michael.
> 
> _________________________________________________________________
>      To unsubscribe: mail lazarus-request at miraclec.com with
>                 "unsubscribe" as the Subject
>    archives at http://www.lazarus.freepascal.org/mailarchives
-- 
Tony Maro <tony at maro.net>






More information about the Lazarus mailing list