4 Replies Latest reply on Jul 22, 2014 10:04 AM by philmodjunk

    Please give me an onpanelchange script trigger that's executed AFTER the panel change

    JohnDee

      Title

      Please give me an onpanelchange script trigger that's executed AFTER the panel change

      Post

           Once again I was playing around with slider buttons, trying out a method I 'd attempted in the past without success (although to my chagrin, I 'd forgotten I 'd tried it before...):


           Buttons go outside the panel, and the highlighted button is hidden or shown based on the current panel, triggered by a panel change. Should work wonderfully and it's the best way to implement buttons for sliders it seems...on paper...sadly. The problem is you need to refresh the buttons with each panel change BUT the onpanelchange scirpt trigger gets executed BEFORE the panel change, hence you can't program it to get the current panel name and if it is X,Y,Z hide the appropriate highlighted buttons... Only if there was an onpanelchange script trigger executed AFTER the panel change would this work, sadly. And I say sadly because it's by far the most elegant way, with the available tools to implement this. I 've not given up, and I am right now trying to combine onobjectenter to see if this works, but I am almost certain it won't..

      Anyone on the same boat?

        • 1. Re: Please give me an onpanelchange script trigger that's executed AFTER the panel change
          philmodjunk
               

                    BUT the onpanelchange scirpt trigger gets executed BEFORE the panel change, hence you can't program it to get the current panel name and if it is X,Y,Z hide the appropriate highlighted buttons...

               Perhaps you didn't know that there are TWO get functions you can use to get data on your panels when used with this script trigger:

          Get(TriggerCurrentPanel)

                The index number and object name of the tab panel or slide panel to be switched from when the OnPanelSwitch script trigger is activated.

          Get(TriggerTargetPanel)

                The index number and object name of the tab panel or slide panel to be switched to when the OnPanelSwitch script trigger is activated.

               This should enable you to identify both the current panel and the panel to which you are switching due to the user sliding the panel or clicking a tab control label.

          • 2. Re: Please give me an onpanelchange script trigger that's executed AFTER the panel change
            Shields

                 Get ( TriggerTargetPanel ) will get you the Index/Name array of the target panel.  However, one shortcoming is that there are no functions to perform AFTER the switch.

                 I am trying to go to a different panel, and then automatically go back to the originating panel.  It is a visual method to make the user fee like they are swiping through an unlimited number of panels, when I really just have "Previous/Current/Next."  

                 If anyone knows of a way to perform functions after a panel is activated, that would be very helpful.

            • 3. Re: Please give me an onpanelchange script trigger that's executed AFTER the panel change
              Shields

                   FYI...for my purpose, I used the "OnPanelSwitch" script trigger to perform all the functions I needed, then put a "Halt Script" step at the very end so that the panel did not actually switch.

                   This improves the appearance to the user (no flash of panels switching anymore), and it performs the functions I need.

                   Just some info in case anyone was looking for a similar trick.

              • 4. Re: Please give me an onpanelchange script trigger that's executed AFTER the panel change
                philmodjunk

                     Exit Script [false] can also be used to cancel out the "post trigger" processing of many script triggers. See "Setting up Script Triggers" for more on this info.