Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Played a bit with script triggers today, have a question about tabs. I expected to be able to set a trigger on each individual tab within one tab set. But in checking this all the tabs in the set are set when one is set. Also can't seem to get a trigger when clicking on any of the tabs, with trigger set to object enter. Am I missing something here? I would think that each individual tab would have its own setting, similar to object names for tabs, and not sure why activating the tab does not trigger the script.

Posted

Activating the tab DOES trigger the script. The problem is that clicking on a tab panel does not activate it - that happens only if you tab into it or select it using Go to Object[].

Posted

Thanks comment, do you think that makes sense? As I almost never have someone tab into another tab, the only way to trigger the script is thru a script step? In playing with portals I found that setting the portal object to trigger on enter will do so when you enter any field in the portal, so why not be able to trigger a tab object script by clicking a field within that tab? Anyway thanks for the clarification!

Posted

do you think that makes sense?

No, though I suppose there are some legacy issues at work here. I never liked the possibility of "activating" tab panels and buttons - I don't see a similar thing in other applications and it's not good user interface, IMHO. I think there should be another event in script triggers, 'OnObjectClick', and the need for a separate Button Setup… procedure should be eliminated.

Posted (edited)

At first I thought it was weird also, because the layout object (the one you name) is a tab panel, not a tab set.

But after all, it would mean that you would need a trigger per pannel, where now you can control a whole set by just a single trigger and a script parameter.

Probably better this way, though inconsistent.

Edited by Guest
Posted

At first I thought it was weird also, because the layout object (the one you name) is a tab panel, not a tab set.

But after all, it would mean that you would need a trigger per pannel, where now you can control a whole set by just a single trigger and a script parameter.

Probably better this way, though inconsistent.

Well I was hoping to finally get away from having separate buttons to navigate to tab locations, but looks like I'll be keeping them around for a while. Most all my applications require some sort of script action once a tab is selected. Also I'm not sure how useful it is to set the trigger on an object that can only be selected via another script step or tab in. I can't think of once where I've set tabs to go to anything other than an object or field that the user can already see, when that rarely occurred I set a button with a message something like continue to next as the last tab location so the user knows there's more. Just my 2 cents. Was really hoping to quit using work around's with tabs!

Posted

it would mean that you would need a trigger per pannel, where now you can control a whole set by just a single trigger and a script parameter.

I am not sure what you mean here. How can you attach a single trigger to the entire tab control object, when you cannot even select it as such?

Posted

The frontmost tab panel can be identified if the tab panels have object names. See expenses tabs in this modified template file.

budgets.zip

Posted

That's very interesting. It would never occur to me that attaching a script trigger to a panel actually attaches it to the entire tab control.

What a weird beast the tab control is: for some purposes, like object-naming or fill color, every panel is a separate object; for others, like border attributes and script triggers, it's a single object.

Posted (edited)

Actually, you can now get rid of all work-arounds to manage tab access by performing a script (onObjectModify).

Unfortunately, you can't attach a onObjectEnter trigger to a tab pannel, wich would allow us to simply control access with a False script result.

Edited by Guest
Posted

Actually, you can now get rid of all work-arounds to manage tab access by performing a script (onObjectModify).

Unfortunately, you can't attach a onObjectEnter trigger to a tab pannel, wich would allow us to simply control access with a False script result.

Not sure I understand, as I want to be able to trigger a script if a tab label is clicked, after all you are invoking a change, and this tab label is pretty much like a button in itself. But so far, as Comment said, you can only activate the entire tab set by tabing into it or selecting it via a script step. I've found no way to trigger a script by simply clicking on the tab label itself which to me would be an intuitive place to place a trigger. Perhaps you can elaborate on how I can do this.

Posted

I'm afraid you have missed the point of the demo file posted above - it DOES trigger a script by clicking on a tab (or rather by CHANGING the frontmost tab panel). Note that it triggers the same script no matter which tab you click, so you need to use the GetLayoutObjectAttribute() function in order to determine the course of the triggered script.

This topic is 5795 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.