MultiSelection in Listbox

  1. 4 months ago

    Arief S

    Jan 10 Bandung - Indonesia

    Hi,
    in Xojo's Listbox, is it possible to select the row in multi selection?

    I have a data ,

     column0	column 1
    	  001		Orange
    	  001		Orange
    	  002		Carrot
    	  003		Kiwi
    	  003		Kiwi
    	  003		Kiwi

    So, when the user click rows with value '001' in column 0, both rows should be selected, and so on.

    any helps ?

    thanks
    regards,
    arief

    if Listbox1.Cell(i,0)="001" then
  2. Wayne G

    Jan 10 Pre-Release Testers, Xojo Pro New Zealand axisdirect.nz

    http://docs.xojo.com/ListBox.Selected

  3. Arief S

    Jan 10 Bandung - Indonesia

    I have set the listbox type into Multiselect, but still not working

    For i As Integer = 0 To ListBox1.ListCount - 1
    
    if Listbox1.Cell(0,i)="001" then
    ListBox1.Selected(i) = True
    Listbox1.setfocus
    end if
    
    Next

    when it run on IDE, shows no error, but dont work ;(

    thanks
    arief

  4. Jean-Yves P

    Jan 10 Pre-Release Testers, Xojo Pro Answer Europe (France, Besançon)
    Edited 4 months ago
    if Listbox1.Cell(i,0)="001" then
  5. Arief S

    Jan 11 Bandung - Indonesia

    ah..
    my mistake, i didnt realize.

    thanks
    arief

or Sign Up to reply!