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

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

Recommended Posts

Posted

I'm pretty sure the answer is no, but is there a way to capture the position of a window so that I can do a script that will snap it back to its original position when a user moves it? 

As far as I know, there are no script triggers that can run when a window is moved, just changed (dimension, mode, etc.)

Posted

This is the first I’ve heard such a request. What’s the use case? Why do you care that the user moved the window?

Posted

Good question... I have a window acting as a kind of launcher with buttons. It's only 100 pixels wide. Some of the buttons have popup windows that in turn open a card window that is much larger.  Since a new card window is based on the parent, I've done some convoluted math to make sure it appears on the screen near the main window. The problem is, if the user moves the main window, the card may end up off the screen with no way to interact with it. That's why I want to move the main window back to its original location if they move it.

I have set a script step that moves the main window when the card window is opened, but that doesn't prevent them from moving it after the card appears.

Posted
21 hours ago, vinnygi said:

I've done some convoluted math to make sure it appears on the screen near the main window. The problem is, if the user moves the main window, the card may end up off the screen with no way to interact with it.

Can't you use some more "convoluted math" to prevent this from happening?

 

Posted

Spawn a regular window off-screen. Pop the card window from that. Then the user can't move. It will need to be based on it's own file, or the user won't be able to do anything else with any window.

Generally, I'm not a fan of forcing things on the user, unless absolutely necessary. So you will need to consider if that's really necessary vs just having a floating window they can place where they want.

You may also need to do some dancing to make sure scripts don't inadvertently take over that launcher window. A separate file can go a long way in making that management easier.

  • Thanks 1

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