[Lazarus] Trunk broke TListBox behaviour

zeljko zeljko at holobit.net
Thu Sep 8 09:30:04 CEST 2011

On Thursday 08 of September 2011 08:55:24 Graeme Geldenhuys wrote:
> Hi,
> I just updated my copy of lazarus (unstable) to the latest Trunk
> revision. I noticed that with the menu item reshuffle, that my Editor
> Toolbar items are now all wrong. That shouldn't be a huge thing to
> fix, so clicked the Configure Toolbar button.
> Now if I add a item to the ListBox (items that will appear on the
> toolbar), the "Move up" and "Move down" functionality of that ListBox
> is now broken. It works perfectly in Lazarus (stable).
> Looking at the code (as shown below), I can't see anything wrong
> either. After all, moving items up or down in a listbox is a simple
> task. So it seems that in Trunk the TListbox Items.Exchange() is
> broken, or the ItemIndex property is broken.
> procedure TEdtTbConfigForm.btnMoveUpClick(Sender: TObject);
> begin
>   if lbToolbar.ItemIndex = -1 then
>     exit;
>   if lbToolbar.ItemIndex > 0 then
>   begin
>     lbToolbar.Items.Exchange(lbToolbar.ItemIndex, lbToolbar.ItemIndex-1);
>     lbToolbar.ItemIndex := lbToolbar.ItemIndex-1;
>   end;
> end;
> My Lazarus (stable) is compiled with LCL-GTK2, and my Lazarus
> (unstable) is compiled with LCL-QT.  Maybe it is a LCL-Qt with
> TListBox bug. I'll recompile my Lazarus (unstable) with LCL-GTK2 and
> report back.

Please open an issue about it and attach small example of problem.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20110908/edbd7891/attachment-0003.html>

More information about the Lazarus mailing list