Control reference disappears

This forum can be browsed by the general public. Posting is limited to current SAPIEN license holders with active maintenance and does not offer a response time guarantee.
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.
Sigmablock
Posts: 2
Meble kuchenne na zamówienie - na wymiar - Wrocław
Joined: Tue Apr 07, 2020 3:30 pm

Control reference disappears

Post by Sigmablock »

Product, version and build: Powershell Studio 2020 - v 5.7.174
32 or 64 bit version of product: 64
Operating system: Win10 1903
32 or 64 bit OS: 64

Should be quite an easy on this, apologies if it's been asked before - I did search (entirely possible I used incorrect search terms) - am very new to PoSH Studio, previously only exclusively used ISE. Sometimes, when I mouse over the relevant Trigger_Click, the script appears to have dropped the control reference, am not sure why. What is the best way of putting this back? Currently I go back to designer, double click on the re-sized button to that it recreates the trigger and copy all the code into that and delete the old one that lost the reference. Clearly this is long-winded way of doing it. What is the correct way to reset a reference?

Many thanks

Screenshot of how it should look:
triggerclick.png
triggerclick.png (4.1 KiB) Viewed 253 times

User avatar
brittneyr
Site Admin
Posts: 428
Joined: Thu Jun 01, 2017 7:20 am

Re: Control reference disappears

Post by brittneyr »

To add or change event functions, open your form in the designer. Select the control where the reference is missing. From the properties panel, select the Events for that control:
SPS_PropertiesEvents.png
SPS_PropertiesEvents.png (36.5 KiB) Viewed 245 times
Brittney Ryn
SAPIEN Technologies, Inc.

Sigmablock
Posts: 2
Joined: Tue Apr 07, 2020 3:30 pm

Re: Control reference disappears

Post by Sigmablock »

Hiya,

Apologies for the delay, been on other things. Thank you for the answer!