Product: PowerShell Studio 2021 (64 Bit)
Build: v5.8.188
OS: Windows 10 Enterprise (64 Bit)
Build: v10.0.19042.0
When creating a new form the MainForm, the name defaults to the title assignment as it does for other controls. We have a standard to assign a specific format to the main form title, which is <product> V<version> (c) <company name>
This creates a name that's not particularly nice. eg. $formCnwservicesV1006cJad
While this doesnt impact the behaviour when assigning other events & controls as it defaults to the initial name assignment, aesthetically, it's not that nice and it also truncates from the full title. Older versions of PSS use to use MainForm as the main title & other controls used the control name followed by an incrementing integer. I dont have too much issue with non-title controls using their label text as it's reasonably useful when reading through the code.
But with the mainform it's useful when jumping from project to project when you're searching for comparisons on specific settings. eg. may be looking for $Mainform.refresh(). Is the only way to change this behaviour to update the Design.Name?
Mainform title
Forum rules
DO NOT POST LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
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 LICENSE NUMBERS, ACTIVATION KEYS OR ANY OTHER LICENSING INFORMATION IN THIS FORUM.
Only the original author and our tech personnel can reply to a topic that is created in this forum. If you find a topic that relates to an issue you are having, please create a new topic and reference the other in your post.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Re: Mainform title
You are correct, the only way the Name property is not updated is if you update the control or form name. When the text is set on a control or form and the name of the control has not been set manually, the Name property is updated. This behavior is consistent with older builds of PowerShell Studio and there are no plans to change this.
Brittney
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.
- Alexander Riedel
- Posts: 8479
- Last visit: Thu Mar 28, 2024 9:29 am
- Been upvoted: 37 times
Re: Mainform title
[Topic moved by moderator]
Please post in the corresponding product forum for product related questions.
Please post in the corresponding product forum for product related questions.
Alexander Riedel
SAPIEN Technologies, Inc.
SAPIEN Technologies, Inc.