Jump to content
stefangs

Remembering the front-most tab

Recommended Posts

Hi all,

I have a problem similar to the one discussed in this thread.

It was suggested that the active tab could be captured using a normal script step with a script trigger on exiting the layout, but I can't find the proper script step.

I messed around with OnPanelSwitch and GetLayoutObjectAttribute, but whatever I tried, didn't work. At least, going back to the proper tab with Go to Object is easy.

Thanks for any help,

 

Edited by stefangs

Share this post


Link to post
Share on other sites
57 minutes ago, stefangs said:

messed around with OnPanelSwitch and GetLayoutObjectAttribute,

OnPanelSwitch is relevant,  GetLayoutObjectAttribute is not. Simply make the triggered script remember the target panel using the Get ( TriggerTargetPanel ) function.

Of course, all this can be avoided if you open a new window, do whatever you need to do, then close the window to return to your previous state intact.

 

Edited by comment
  • Like 1

Share this post


Link to post
Share on other sites

Perfect, thanks. I think it is more intuitive to the user than opening a new window, but that depends on the application. In my case, this option is great!

Share this post


Link to post
Share on other sites
13 minutes ago, stefangs said:

I think it is more intuitive to the user than opening a new window,

The user does not have to know.

Share this post


Link to post
Share on other sites

Now you have my curiosity. How would the user not know? Do you mean by setting the window coordinates so that both windows align on top of one another?

Also, the user will be presented with yet another window that has tabs, so this process may end up opening a lot of windows.

Share this post


Link to post
Share on other sites
18 minutes ago, stefangs said:

Do you mean by setting the window coordinates so that both windows align on top of one another?

Yes. That is the default. This is assuming that the user needs to interact with the other layout. Otherwise you can have your script freeze the window, open a new one (either on top or off-screen), do its thing and return - and the user will not notice anything (at least not on a Mac).

 

Share this post


Link to post
Share on other sites

Interesting! I suppose then there are ways to prevent the user from moving or resizing the window, otherwise this trick would break. Why would you want to open a new window off-screen? You can't interact with that, can you?

Share this post


Link to post
Share on other sites

I said "otherwise" - i.e. when the user does not need to interact with the process.

Share this post


Link to post
Share on other sites

 Ah yes, thanks for clarifying. 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

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