May 9, 201411 yr 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?
May 9, 201411 yr 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 …
May 9, 201411 yr Author Sh...t, should have looked harder for that, I am embarrassed... Muchas Gracias guys.
October 3, 201411 yr 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?
October 3, 201411 yr Has anyone found an elegant solution for this? I think you need to describe this in more detail.
October 3, 201411 yr 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?
October 3, 201411 yr 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.
October 3, 201411 yr 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.
October 3, 201411 yr 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.
October 3, 201411 yr YES! Of course! Thank you :-) PS: Profile update done - thank's for the tipp - time passes fast...
Create an account or sign in to comment