[Gambas-user] annoying glitch

Benoît Minisini gambas at ...1...
Sun Mar 8 16:08:40 CET 2015


Le 07/03/2015 18:41, Gary Emms a écrit :
> Hi
> I'm trying to follow a tutorial from Linux Format. I have 2 list boxes
> and I'm trying to move an entry from one to the other using:
>
> Public Sub btnLeft_Click()
>
>      Dim i As Integer
>     'transfer selected itelms to left
>     For i = 0 To lstInCar.Count - 1
>       If lstInCar[i].Selected Then
>         lstAtHome.Add(lstInCar[i].Text)
>       Endif
>     Next
>     'clear the entries from the left (backwards)
>     For i = lstInCar.Count - 1 To 0 Step - 1
>       If lstInCar[i].Selected Then
>         lstInCar.Remove(i)
>       Endif
>     Next
> End
>
> it works fine except, If, and only if, I select the first item in the
> list after it is deleted the new top item is  automatically selected. Is
> this a bug or am I doing something wrong?
> Cheers
> Gary
>

This is fixed in revision #6955: now the selection correctly takes into 
account removed or added items.

Regards,

-- 
Benoît Minisini




More information about the User mailing list