Jump to content
Server Maintenance This Week. ×

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


fmow

This topic is 3506 days old. Please don't post here. Open a new topic instead.

Recommended Posts

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?

Link to comment
Share on other sites

BUT the onpanelchange scirpt trigger gets executed BEFORE the panel change, hence you can't program it to get the current panel name

 

Get ( TriggerTargetPanel )?

 

EDIT: Oops, too late …

Link to comment
Share on other sites

  • 4 months later...

I understand the solution presented in this thread. I can get the name of the target panel. Agreed. So from that perspective it's not relevant, whether the trigger fires BEFORE or AFTER the actual panel switch happens. 

 

However, if I would like to restore a portal row previously memorized for the target panel, it DOES matter when the trigger fires. If I'm still on the old panel when that happens (which seems to be the case), then the portal row of the target panel cannot be restored.

 

Has anyone found an elegant solution for this?

Link to comment
Share on other sites

Ok:

 

TabPanel 1, memorized portal row = 5 (in form of a global variable)

TabPanel 2, memorized portal row = 2

TabPanel 3, memorized portal row = 7

 

As the user switches back and fourth, the portal rows should be restored. For example, as the user is switching from panel 2 back to panel 1, portal row 5 should be restored.

 

Doing this "OnPanelSwitch" fails. Which is too bad, because this would be an "elegant" solution compared to all the other methods out there which create quite a bit of overhead.

 

To put it differently: has anyone figured out a technique that uses OnPanelSwitch to restore portal rows?

Link to comment
Share on other sites

I'm not sure what you mean by “restored”; but why not use these global variables to highlight a row via Conditional Formatting? Then there is nothing to restore; you just switch between panels in which something is highlighted anyway.

Link to comment
Share on other sites

I very much appreciate your help! Thank you! I'm afraid we're getting into too much structural/functional detail here though. It's... well, user interface stuff...

 

To keep it simple let me rephrase once again: Is it possible to use OnPanelSwitch to do something on a target panel. It seems that FileMaker only switches to the target panel, AFTER the entire script executed OnPanelSwitch has run/ended.

Link to comment
Share on other sites

Sounds like you'd want to use the OnObjectModify trigger, which runs after the tab is switched.

 

You can then pull out ye olde function:

GetLayoutObjectAttribute ( "tab2" ; "isFrontPanel" )

 

...and branch your script logic accordingly.

 

PS: please update your profile to reflect your FileMaker version.

Link to comment
Share on other sites

This topic is 3506 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.