[[Template core/front/global/updateWarning is throwing an error. This theme may be out of date. Run the support tool in the AdminCP to restore the default theme.]]
You can not read out selected item itself or it's value, only index.
To know the value, you need to keep track in you source array that was parameter in SetItems method.
As I said earlier - Omron's visual components are extremely limited.
No, actually not.
You can use VB.NET code in editor (Compact Framework 3.5) but visual components provided by Omron are not original .NET components. Those are Omron's own extremely limited versions. You can examine them with ILSpy from Omron libraries or use System.Reflection on runtime.
I have used following code to update listbox contents:
Dim logs As System.Collections.Generic.List(Of Object) = Nothing
logs = New System.Collections.Generic.List(Of Object)
logs.Add("one")
logs.Add("two")
logs.Add("three")
lstLogViewer.SetItems(logs.ToArray())
But also your code should work if you modify it as following:
Sub ListBox_Update
Dim array(100) As Object
Dim x As Integer
For x = 0 To 99
array(x) = ListItems(x)
Next x
listbox0.SetItems(array)
End Sub
NB! Your "ListItems" must be array of strings !
Basically: parameter passed to SetItems method must be array of objects, but those "objects" must be strings.