Search found 11479 matches

by jvierra
Sun Nov 12, 2017 2:03 pm
Forum: PowerShell GUIs
Topic: Does anyone have a working example of selectedindexchanged (combobox)
Replies: 14
Views: 241

Re: Does anyone have a working example of selectedindexchanged (combobox)

It was an example and not I ntended to be just copied into you form.

Take this code and add it to you "SelectedIndexChanged event.


$items = if($this.Text -eq 'ListOfLetters){@('A','B','C')}else{){@('1','2','3')}
$comboBox2.Items.Clear()
$comboBox2.Items.AddRange($items)
by jvierra
Sun Nov 12, 2017 1:36 pm
Forum: PowerShell GUIs
Topic: Does anyone have a working example of selectedindexchanged (combobox)
Replies: 14
Views: 241

Re: Does anyone have a working example of selectedindexchanged (combobox)

$ComboBox You must use the variable whatever you named it. By default PSS names the first ComboBox variable $combobox1 and increments the number for each box. You have to use the variable that was created. It may be 1,2,3 or other depending on the number and order of the boxes you added in the desig...
by jvierra
Sun Nov 12, 2017 10:44 am
Forum: PowerShell GUIs
Topic: Does anyone have a working example of selectedindexchanged (combobox)
Replies: 14
Views: 241

Re: Does anyone have a working example of selectedindexchanged (combobox)

What proposed code. I posted an example. You need to change your code to use the method in the example.
by jvierra
Sun Nov 12, 2017 9:19 am
Forum: PowerShell GUIs
Topic: Does anyone have a working example of selectedindexchanged (combobox)
Replies: 14
Views: 241

Re: Does anyone have a working example of selectedindexchanged (combobox)

Here is a full working example of how to synchronize lists.
by jvierra
Sun Nov 12, 2017 8:32 am
Forum: PowerShell GUIs
Topic: Does anyone have a working example of selectedindexchanged (combobox)
Replies: 14
Views: 241

Re: Does anyone have a working example of selectedindexchanged (combobox)

What does "update automatically" mean? The "SelectedIndexChanged" event is where you would reset the second ComboBox items. $comboBox1SelectedIndexChanged = { $items = if($this.Text -eq 'ListOfLetters){@('A','B','C')}else{){@('1','2','3')} $comboBox2.Items.Clear() $comboBox2.Items.AddRange($items) }
by jvierra
Sun Nov 12, 2017 5:09 am
Forum: PowerShell GUIs
Topic: Does anyone have a working example of selectedindexchanged (combobox)
Replies: 14
Views: 241

Re: Does anyone have a working example of selectedindexchanged (combobox)

If you search this forum you will find numerous examples of this.
by jvierra
Fri Nov 10, 2017 4:04 pm
Forum: PowerShell GUIs
Topic: reading files
Replies: 1
Views: 123

Re: reading files

Yes. It can do it if you write code to read and display a file. You can also download an ini file manager and use that to read and manage ini files.
by jvierra
Fri Nov 10, 2017 1:22 am
Forum: Windows PowerShell
Topic: Can someone please try to explain this very odd behaviour
Replies: 3
Views: 143

Re: Can someone please try to explain this very odd behaviour

Maybe it is your spelling: function Check-UserIsAuthorized { [cmdletbinding()] param ( [System.Security.Principal.SecurityIdentifier]$AuthorizedGroupSID ) if($AuthorizedGroupSID -in [System.Security.Principal.WindowsIdentity]::GetCurrent().Groups){ write-verbose 'User is authorized' return $true } e...
by jvierra
Fri Nov 10, 2017 1:18 am
Forum: Windows PowerShell
Topic: Can someone please try to explain this very odd behaviour
Replies: 3
Views: 143

Re: Can someone please try to explain this very odd behaviour

Works fine for me for all of the above except PowerGUI which I don't have to test with.