Page 1 of 1

Powershell GUI for LMUTIL

Posted: Tue Feb 16, 2016 11:13 am
by ron.allison08
Hi,

I'm a beginner with Powershell, but in the process of creating a GUI for returning license statistics on our license servers.

Here's the gist:

The different network-licensed software packages are listed in a combobox.
When I select from the combobox, it outputs the text to a richtextbox.
As of right now, I'm using a button to call the Clear() function to remove the text from richtextbox.
If I don't use the Clear button, and select another software package from the list, it appends the output text to the richtextbox.

What I would like:
When selecting from the combobox, it clears the output in the richtextbox.

Thanks for any help.

Re: Powershell GUI for LMUTIL

Posted: Tue Feb 16, 2016 11:55 am
by monoeagle
Hi,
$ComboBox1_SelectedIndexChanged=
{
$richtextbox1.Clear()

# do something else
}
greetz

Re: Powershell GUI for LMUTIL

Posted: Tue Feb 16, 2016 12:03 pm
by ron.allison08
Hi,

Thanks for the input, unfortunately this did not work. It continues to append the output to the richtextbox.

Re: Powershell GUI for LMUTIL

Posted: Tue Feb 16, 2016 12:09 pm
by jvierra
$richtextbox.Text='New text'

Of course without your script we cannot really tell how you are doing this. You have to post the code that outputs to the textbox.