SAPIEN Forums

Windows.Forms.ListView

Windows.Forms.ListView

Posted: Mon Aug 06, 2018 3:32 am

by hrlarsen

Windows.Forms.ListView

I have a button to click that are working fine.
But how do I check "1 specific ListView Item".
If it is Checked in the checkbox, True / False before going forward.
--------------------------------------------------------------# Add list items
$ListViewItem = New-Object System.Windows.Forms.ListViewItem("Item 1")
$ListView.Items.Add($ListViewItem)
-------------------------------------------------------------

Re: Windows.Forms.ListView

What is $1? It is a variable. Look at the name property on the tab to see what the real name is.

Re: Windows.Forms.ListView

Posted: Mon Aug 06, 2018 2:46 pm

by hrlarsen

As standard (name) is $listView.Name = "listView1"
But I have renamed it to = "$1"

What variable code am I missing.

Re: Windows.Forms.ListView

Posted: Mon Aug 06, 2018 3:14 pm

by jvierra

"$1" is not a name. We don't use "$" in names as it mixes them up with variables. Names need to strings that identify things in a meaningful way. "$1" is not meaningful and will result in an empty name.