Douwe Siegersma Member Licensed User Longtime User Jul 6, 2020 #1 I'm an old VB-6.0 guy and trying to get the selected item from a CustomListView. I thought the 'Value' property would return the text of the selected item but it doesn't. It always returns "0" It is a very simple listview with only single-line text items. Could someone give me an example of how to do this?
I'm an old VB-6.0 guy and trying to get the selected item from a CustomListView. I thought the 'Value' property would return the text of the selected item but it doesn't. It always returns "0" It is a very simple listview with only single-line text items. Could someone give me an example of how to do this?
mcqueccu Expert Licensed User Longtime User Jul 6, 2020 #2 You have to set the return value. If possible post sample of your code so that we can be able to best help you. Where are you getting the data from? Upvote 0
You have to set the return value. If possible post sample of your code so that we can be able to best help you. Where are you getting the data from?
Douwe Siegersma Member Licensed User Longtime User Jul 6, 2020 #3 The listbox contains the files in a directory. I tried: B4X: Sub SudokuLijst_ItemClick (Index As Int, Value As Object) Log(Index & " - " & Value) FileNaam = SudokuLijst.GetValue(Index) End Sub Where SudokuLijst is the CustomListView Upvote 0
The listbox contains the files in a directory. I tried: B4X: Sub SudokuLijst_ItemClick (Index As Int, Value As Object) Log(Index & " - " & Value) FileNaam = SudokuLijst.GetValue(Index) End Sub Where SudokuLijst is the CustomListView
M Mahares Expert Licensed User Longtime User Jul 6, 2020 #4 I think mcqueccu is asking you how you are adding the items to customlistview. This: SudokuLijst.AddTextItem(s, returnedvalue) if returnedvalue is the file name, then: Code: Sub SudokuLijst_ItemClick (Index As Int, Value As Object) Log(Index & " - " & Value) FileNaam = value End Sub Upvote 0
I think mcqueccu is asking you how you are adding the items to customlistview. This: SudokuLijst.AddTextItem(s, returnedvalue) if returnedvalue is the file name, then: Code: Sub SudokuLijst_ItemClick (Index As Int, Value As Object) Log(Index & " - " & Value) FileNaam = value End Sub
Douwe Siegersma Member Licensed User Longtime User Jul 6, 2020 #5 Yes, That's it! Really did not know that. Thank you both for your support. Regards, Douwe Upvote 0