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

How do I get "smooth" new windows of different sizes.


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

Recommended Posts

Posted

I have a solution where I have several "small" master data layouts that I have linked to custom menus. the custom menu runs a basic script which opens a new window, loads a layout and resizes the window.

The problem I have is that if my start point is my main interface which has a much larger window size the transition to the new window is pretty jerky. If I have a utility (small) window as my start point the new window works fine.

Anyone have any tips here for calling "new" windows of a smaller size.

Posted

When you call your new window script step, enter the width and height as zero. Then, call your Go To Layout Script Step, Hide the Status Bar (if necessary) and then call the Adjust Window [Resize to Fit] script step.

Let me know if that is what you were looking for.

Posted

Much better. Many thanks Lauren.

One other minor problem : I'm using CenterWindow("vertical") & CenterWindow("horizontal") to position the window but it doesn't actually center the window in the centre of the screen as I'd expect. Any ideas on that one?

Your help is much appreciated.

Posted (edited)

This is the code I use to open a window for Mac users. If you want it to be in the center of the desktop, use Get ( WindowDesktopWidth ) and Get ( WindowDesktopWidth ) in the first two set variables instead. For really big desktops (or multi-monitor setups, such as mine), I would expect the window to be centered above the window below it which is what this code does.

Notice the minus 25. It places the window slightly higher which is user-expected behavior.


Set Variable [ $window_center; Value:Get ( WindowLeft ) + ( Get ( WindowWidth ) / 2 ) ] 

Set Variable [ $window_middle; Value:Get ( WindowTop ) + ( Get ( WindowHeight ) / 2 ) ] 

New Window

Go to Layout

Show/Hide Status Area [ Hide ] 

Adjust Window [ Resize to Fit ] 

Set Variable [ $window_width; Value:Get ( WindowWidth ) ] 

Set Variable [ $window_height; Value:Get ( WindowHeight ) ] 

Move/Resize Window [ Current Window; Top: $window_middle - ( $window_height / 2) - 25; Left: $window_center - ( $window_width /2 ) ]

Edited by Guest
  • Like 1

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