[Gambas-user] annoying glitch

Gary Emms gary.emms at ...626...
Sat Mar 7 18:41:21 CET 2015


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




More information about the User mailing list