Can't find control (Properties lists Visible)

Ask questions about creating Graphical User Interfaces (GUI) in PowerShell and using WinForms controls.
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.
This topic is 2 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
harringg
Posts: 18
Last visit: Mon Oct 30, 2023 11:13 am

Can't find control (Properties lists Visible)

Post by harringg »

Product: PowerShell Studio 2021 (64 Bit)
Build: v5.8.191
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19042.0

I've had this happen a few times, and wondering if I'm doing something wrong, or if it's a bug.

I'll drag a Label Control and (possibly drag it off screen? I don't think so), but it's gone from the GUI and the settings are listed as visible and location is "on the form". I'll quit the app and relaunch, and it's still not visible. I can't even "bring to front", because I can't "see" it. I've even selected all Controls on the form and did a send to back, hoping it'd showup. If it's not visible on the Form, is there a way to delete from the properties panel and start over? Note: ElevatedStatus is not the label I'm looking for. It's a second label, named StatusLabel
Attachments
2021-08-09_10-01-20.png
2021-08-09_10-01-20.png (58.43 KiB) Viewed 3226 times
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Can't find control (Properties lists Visible)

Post by jvierra »

That almost always means that you have "kicked" the control way off the visble part of the form. If you select the control in the obhject browser it should show a location or just set the location in the properties to "0,0" and it should end up at the top left corner of the form.

If a label is auto sized and has no text it will only be visible as a tiny vertical line which may be impossible to see. Add text to it. I usee a line of Xs - "XXXXXXXXXXXXXXXXXXX".

Once found reset the whole thing and start over or delete the control and create a new one. Put in text until positioned. Lock the controls as needed or all and unlock as needed. This will prevent "kicks" or accidental drags.
This topic is 2 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked