[Lazarus] Lazarus COM Event on Windows
wile64
wile64 at gmail.com
Mon Oct 5 12:39:48 CEST 2009
On Sun, 4 Oct 2009 21:43:18 -0700
"Boian Mitov" <mitov at mitov.com> wrote:
> Hi folks,
>
> I am testing some code ported from Delphi.
> I have discovered a bug in the Lazarus TCheckListBox implementation.
> If you create a new application in Windows and add TCheckListBox with
> few items in it, the OnClickCheck event is fired before the new item
> is selected, and the new check status is assigned:
>
> procedure TForm1.CheckListBox1ClickCheck(Sender: TObject);
> begin
> if( CheckListBox1.ItemIndex >= 0 ) then
> begin
> if( CheckListBox1.Checked[ CheckListBox1.ItemIndex ] ) then
> CheckListBox1.Items[ CheckListBox1.ItemIndex ] := 'Checked'
>
> else
> CheckListBox1.Items[ CheckListBox1.ItemIndex ] := 'Unchecked';
>
> end;
>
> end;
>
> Here is a test application I have uploaded:
>
>
> www.mitov.com/CheckListBoxBug.zip
>
> To reproduce just click on the check box of a non selected item.
>
> This aside from being different than the Delphi version effectively
> renders the OnClickCheck largely useless. I have not tested it in
> Linux yet.
Please create a bug report for this.
Mattias
More information about the Lazarus
mailing list