Search found 28 matches

by hrlarsen
Sat May 11, 2019 3:35 am
Forum: PowerShell GUIs
Topic: Listview alphabetical a-z Ascending and Descending
Replies: 2
Views: 102

Listview alphabetical a-z Ascending and Descending

Listview form how to sort it alphabetical a-z What I mean is Ascending and Descending. I will try to give more information about her what I am after. First we create the standard ListView Form size ect I am not gonna list all about that. # ListView form $ListView = New-Object System.Windows.Forms.Li...
by hrlarsen
Fri Aug 10, 2018 8:46 am
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Re: Windows.Forms.ListView

Thanks I am trying to do this in pure code in the editor. The problem whit the designer is very high. You cant see any code when you change things, even if you dobbelt clik on the form elements. You unly get the form or click function top showen, so that part is very limitet in the program. That is ...
by hrlarsen
Fri Aug 10, 2018 3:44 am
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Re: Windows.Forms.ListView

Have been looking at what you said. STEP1 # Add HEAD columns ListView $listView.Columns.Add("Header items text") ------------------------------------------------------------------------------ STEP2 # Adds a new group $listViewGroup1 = New-Object -TypeName 'System.Windows.Forms.ListViewGroup' $listVi...
by hrlarsen
Thu Aug 09, 2018 10:35 am
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Re: Windows.Forms.ListView

Thanks Can you make 1 listview demo like this. ---------- Group1 Checkbox itemtext1 Checkbox itemtext2 Group2 Checkbox itemtext3 Checkbox itemtext4 --------- button here. If listview items is checked and variable from itemtext1 ok execute. If listview items is checked and variable from itemtext2 ok ...
by hrlarsen
Tue Aug 07, 2018 2:19 am
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Re: Windows.Forms.ListView

okay can you show me a example that really work corretly as it was ment to. The unly solution that I get to work is: #listViewItem1 checked if($listViewItem1.checked -eq $true) { do your script } #listViewItem2 checked if($listViewItem2.checked -eq $true) { do your script } # or whit checked if($lis...
by hrlarsen
Mon Aug 06, 2018 2:46 pm
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Re: Windows.Forms.ListView

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

What variable code am I missing.
by hrlarsen
Mon Aug 06, 2018 2:24 pm
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Re: Windows.Forms.ListView

The name is $1 for Item
# Add list items

Code: Select all

$ListViewItem = New-Object System.Windows.Forms.ListViewItem('Item 1')
$ListView.Items.Add($ListViewItem)
$ListViewItem.Name = '$1'
$Form.Controls.Add($ListView)
by hrlarsen
Mon Aug 06, 2018 11:56 am
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Re: Windows.Forms.ListView

I have tried [b] if($ListView.Items['Item 1'].Checked) { start-process https://www.google.dk } [/b] But nothing happens when I run it, and click the first item 1. and click the button. I dont get any error code to check either. ------------------------------------------------------------------------...
by hrlarsen
Mon Aug 06, 2018 6:25 am
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Re: Windows.Forms.ListView

Can I number every item whit number 1-2-3 "ItemChecked" Is possible so something like this can work? #Item 1 if ($ListViewItem.ItemChecked($1)) { #test me out if item 1 checkbox is clicked. start-process "https://www.google.dk" } And give this the number 1 # Add list items $ListViewItem = New-Object...
by hrlarsen
Mon Aug 06, 2018 3:32 am
Forum: PowerShell GUIs
Topic: Windows.Forms.ListView
Replies: 19
Views: 1300

Windows.Forms.ListView

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 Syst...