Bug in ColumnView Select Event? gambas 1.0.10

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug in ColumnView Select Event? gambas 1.0.10

Werner-4

I have a columnview which can potentially hold several thousand records.

Trying to keep a tab on which rows are selected at any given time everything works as expected except when the mouse is down and then dragged over several rows. This has been observed in both Multi and Extended selection modes.

ll is the name of the ColumnView.

' Gambas class file

PUBLIC selItems AS NEW String[] 'selected item keys in ll

-------------------------------------

PUBLIC SUB ll_Select()
DIM key AS String
DIM i AS Integer

  IF ll.Available THEN
    IF IsNull(ll.Item)THEN
      PRINT "item selection is NULL!!!"
    ELSE
      key=ll.Item.Key
      IF ll.Item.Selected THEN 'select or deselect?
        selItems.Add(key)
        PRINT "added key ",key
      ELSE
        i = selItems.Find(key)
        IF i=(-1) THEN
          PRINT "key not found in selItems"
        ELSE
          PRINT "removed key ",key
          selItems.Remove(i)
        END IF
      END IF
    END IF
  ELSE
    PRINT "no selection available!!!"
  END IF
  
END

--------------------

Dragging the mouse over rows 3 to 5 results in Console Output:

added key     2		'OK
added key     2		'should be 3
added key     3		'should be 4

Dragging the mouse over rows 5 to 3 results in Console Output:

added key     4		'OK
added key     4		'should be 3
added key     3		'should be 2

The first selected item is repeated and the last item is omitted.

Best Regards,
Werner



------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ Gambas-user mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gambas-user