Search found 11106 matches

by jvierra
Thu Aug 17, 2017 7:46 am
Forum: PowerShell GUIs
Topic: access group box from another form
Replies: 6
Views: 44

Re: access group box from another form

Here is an example of how to send to a child:
by jvierra
Thu Aug 17, 2017 7:41 am
Forum: PowerShell GUIs
Topic: access group box from another form
Replies: 6
Views: 44

Re: access group box from another form

The sample is just two blank forms. It does not tell us what you are trying to do. hen a form calls a form the "calling" form is frozen until the "called" form is closed. THis is because the child is opened as a modal dialog. This is how PowerShell works. You cannot execute code in the parent form w...
by jvierra
Thu Aug 17, 2017 6:53 am
Forum: PowerShell GUIs
Topic: access group box from another form
Replies: 6
Views: 44

Re: access group box from another form

No idea how you are doing this. The main form cannot execute code while child form is running. You will need to post a simple example of your form.
by jvierra
Thu Aug 17, 2017 4:26 am
Forum: PowerShell GUIs
Topic: access group box from another form
Replies: 6
Views: 44

Re: access group box from another form

Hi woody - it is not possible to understand what you are trying to do. Please provide a more complete explanation. Note that yu cannot type or access a form while it has a child form showing.
by jvierra
Wed Aug 16, 2017 3:16 pm
Forum: PowerShell GUIs
Topic: Combo Box SelectedIndex Changes Automatically
Replies: 17
Views: 162

Re: Combo Box SelectedIndex Changes Automatically

I could have made 20 guesses before guessing t that. That also tells me that your code is changing something on the combo else the autocomplete would not do that. I suspect you will find other issues down the road. Go slow and look hard. Most things are discoverable in the debugger or with some brai...
by jvierra
Wed Aug 16, 2017 2:29 pm
Forum: PowerShell GUIs
Topic: Combo Box SelectedIndex Changes Automatically
Replies: 17
Views: 162

Re: Combo Box SelectedIndex Changes Automatically

Start by placing a breakpoint at the beginning of every event and every function. Run the form to the place where the problem happens and watch every line of code until you see where the error is happening. It may also be caused by interleaved closures. This is the hardest coding error to find. By c...
by jvierra
Wed Aug 16, 2017 2:19 pm
Forum: PowerShell GUIs
Topic: Combo Box SelectedIndex Changes Automatically
Replies: 17
Views: 162

Re: Combo Box SelectedIndex Changes Automatically

Well it's in your code. You just have to keep debugging until you find the code that causes this. It is not a usual behavior of a control. Somewhere you have a mistake or an error. Debugging code takes time to learn. We cannot do it for you since we do not have access to your system. One method for ...
by jvierra
Wed Aug 16, 2017 12:50 pm
Forum: PowerShell GUIs
Topic: Combo Box SelectedIndex Changes Automatically
Replies: 17
Views: 162

Re: Combo Box SelectedIndex Changes Automatically

Sorry. For some reason I missed that. This is a better way to handle validation: $cmb_Role_Validating = [System.ComponentModel.CancelEventHandler]{ $_.Cancel = if ($this.Text -in $($MDTRoles.Role)) { [void]$errorprovider1.SetError($this, '') $false } else { [void]$errorprovider1.SetError($this, 'Ple...
by jvierra
Wed Aug 16, 2017 11:44 am
Forum: PowerShell GUIs
Topic: Combo Box SelectedIndex Changes Automatically
Replies: 17
Views: 162

Re: Combo Box SelectedIndex Changes Automatically

I do not understand why you have this code: Validate-ComboBox What does it do and why are you not using the validating event? If you want a common validation method then just assign both boxes to the same event. This makes the code easier to maintain and understand. If you do feel that a function is...
by jvierra
Wed Aug 16, 2017 11:27 am
Forum: PowerShell GUIs
Topic: Combo Box SelectedIndex Changes Automatically
Replies: 17
Views: 162

Re: Combo Box SelectedIndex Changes Automatically

You still need to provide a clear statement of what is happening using exact control names. You keep saying an index or box changes but fail to provide a complete description. The selection on a combo box will only change if you change the contents or if you have another control that accesses the bo...