Hi all,
I am trying to replace the combination of List&Inputlist with Listview but despite reading everything from the the Beginners Guide to the tutorial etc. I can't get Listview to Gel in my head. I can see by the tutorial how to create one and change it's height/width/colour/ add items etc but not how to get data in and out as I require.
What I am doing is storing a history of results in a push down stack and reading past values as required. The code I am using is below, it functions OK but Listview would look better.
Sub Process_Globals
Dim History As List
...
End Sub
History.Initialize
History.InsertAt(0, 0) 'Puts a "start" value on the stack
Sub StackPush
History.InsertAt(0, Value) 'Pushes value on to top of stack
If History.Size > 15 Then
History.RemoveAt(15) ' Removes value at bottom of stack to limit stack size
End If
End Sub
Sub StackRecall
Dim p As Int
p = InputList(History,"History",-1) 'Displays list and allows selection of item
Value = History.get(p) 'Retrieves value of selected item
End Sub
It would be much appreciated if someone can inject some Listview understanding in to my brain.
Regards Roger
I am trying to replace the combination of List&Inputlist with Listview but despite reading everything from the the Beginners Guide to the tutorial etc. I can't get Listview to Gel in my head. I can see by the tutorial how to create one and change it's height/width/colour/ add items etc but not how to get data in and out as I require.
What I am doing is storing a history of results in a push down stack and reading past values as required. The code I am using is below, it functions OK but Listview would look better.
Sub Process_Globals
Dim History As List
...
End Sub
History.Initialize
History.InsertAt(0, 0) 'Puts a "start" value on the stack
Sub StackPush
History.InsertAt(0, Value) 'Pushes value on to top of stack
If History.Size > 15 Then
History.RemoveAt(15) ' Removes value at bottom of stack to limit stack size
End If
End Sub
Sub StackRecall
Dim p As Int
p = InputList(History,"History",-1) 'Displays list and allows selection of item
Value = History.get(p) 'Retrieves value of selected item
End Sub
It would be much appreciated if someone can inject some Listview understanding in to my brain.
Regards Roger