I have a GUI I am working on that has a ton of fields that get a small green checkmark to appear next to them if the value in them is correct. However when I change the dropdown value, I would like to hide all the icons until the code below them runs and determines if they are needed. Or hides them all if the user changes the dropdown. So I have a ton of these
$picturebox1.Visible = $false
At the start of the dropdown change code. Is there a way to do a "$picturebox*.Visible = $false" type of command? Unfortunately, the $picturebox variable has some letters at the end of it to designate all the different variables, so I can't have it just walk through 1...20 to make the changes in a loop. Though I suppose if thats the only answer, I could, I just hate such generic named variables.
Wildcard GUI commands?
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: Wildcard GUI commands?
In the controls collection you can filter on the "PictureBox" control type, and they will be returned as a collection.
You can also put all of the PB controls in a group box and just enumerate the controls collection of the GB.
You can also put all of the PB controls in a group box and just enumerate the controls collection of the GB.