Powershell GUI: Adding multiple instances of .tooltipseperate to menu
- by obious
So, I'm having a problem whereby for some reason I can only add one instance of a .tooltipseperator to a drop down menu. E.g. I have to create a new .tooltipseperator if I want to add another to a different menu list.
I have this:
$seperator = new-object System.Windows.Forms.Toolstripseparator
$seperator1 = new-object System.Windows.Forms.Toolstripseparator
which correlates to this:
[Void]$packages_menu_bar.DropDownItems.Add($seperator1)
[Void]$packages_menu_bar.DropDownItems.Add($Remove_from_AD)
[Void]$process.DropDownItems.Add($Kill_process)
[Void]$process.DropDownItems.Add($seperator)
My question is this:
how can I add the same instance on a .tooltipseperater to different menu items? Some sort of array?
Thanks