Fritz

MrPLC Member
  • Content count

    3
  • Joined

  • Last visited

Everything posted by Fritz

  1. NA HMI Listbox

    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.
  2. NA HMI Listbox

    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.
  3. NA HMI Listbox

    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.