I am creating a site/server checking application and the end users decided that if a site/server fails they want to be able to click on it and get a tracert outputted. What are my options to have a link embedded in the RTB field? I've included a screenshot. So, in this example, they would want to click on Web Server and open a window that would run test-netconnection -tracert command.
clickable entries in RichTextBox
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: clickable entries in RichTextBox
So I'm trying the listview box and it isn't working as expected. Using the add-listviewitem code that is automatically added, entries are duplicated. In the picture you can see the output to the GUI and the output to the console. The code where I call the add-listviewitem is included.
- $SitePing = $global:SiteDict[$TestCount].SitePing
- $SiteName = $global:SiteDict[$TestCount].SiteName
- $SiteURL = $global:SiteDict[$TestCount].SiteURL
- $SitePorts = $global:SiteDict[$TestCount].Ports -split ","
- $TotalPorts = $SitePorts.Count
- $Path = (Split-Path $script:MyInvocation.MyCommand.Path).replace(" ", "`` ") + "\portqry.exe"
- $listview1.Items.Add($SiteName + "`r`n")
- Write-Host $SiteName
- Add-ListViewItem -ListView $listview1 -Items $SiteName