Recent

Author Topic: Problem with TListBox  (Read 4665 times)

Bandbaz

  • New Member
  • *
  • Posts: 40
Problem with TListBox
« on: November 17, 2009, 06:28:45 pm »
Hi
I tried to compile something on 2 systems. But I had different results.
Both: Ubuntu 9.10, fpc 2.2.4-3, Lazarus 0.9.28.2-0
The only difference i think is: one of them is 32bit and the other one is 64

Add ListBox1 and Button1 to a Form.
Add some items to ListBox1
Set Button1.Onclick to
Code: [Select]
ListBox1.ClearSelection;or
Code: [Select]
ListBox1.ItemIndex:=-1;or
Code: [Select]
ListBox1.Selected[ListBox1.ItemIndex]:=false;
Clicking the button should deselect ListBox items.

It works on my 64bit system.
But on 32bit system, after clicking the button nothing happens and then if I click again on one of the items on ListBox, I will have 2 Items selected! (and it doesn't depend on MultiSelection)

Any idea?
Have you had this experience?
How it works on other systems?

theo

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1927
Re: Problem with TListBox
« Reply #1 on: November 17, 2009, 06:54:17 pm »
Have you had this experience?

Yes, I can reproduce this on Lazarus 0.9.29 r22524M FPC 2.2.4 i386-linux-gtk 2

-> bugtracker.

JimR

  • New Member
  • *
  • Posts: 11
Re: Problem with TListBox
« Reply #2 on: November 23, 2009, 01:29:20 am »
I selected an item in the listbox and checked all 3 of your lines of code on:
Version #:0.9.28.2 beta
Windows 7  32-bit

In all 3 cases the selected (highlighted) item was deselected. 


 

TinyPortal © 2005-2018