![]() Ultimately, it depends on what you find easier to work with. I could have set ToolTip help in each _MouseHover event handler, but personally I find my ShowHelp scritpblock easier to use because I can define all the help strings in one location. However, I would have had to wait until the final script was created to make the change. $txtComputername.add_MouseHover($ShowHelp) In my final PowerShell script, this is what the code looks like: $txtComputername.add_MouseHover($txtComputername_MouseHover)Īs an alternative, I could modify the event to call ShowHelp directly. If I had not used the & operator, my ShowHelp scriptblock would not have run. ![]() Hovering over any of my controls with defined help should show the tooltip. ![]() Exporting the project to a PowerShell script file.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |