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

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

Recommended Posts

Posted

Greeting and Salutations everyone.

I'm starting to discover the many wonderful things one can do in FM7 with creating/positioning/etc multiple windows.

I'm sure that what I'm going to propose seems possible, I just don't know exactly how to make it work.

Some explanation - I've got one window on the left side with all my navigation buttons. When a certain button is clicked, a new window is created, going to the relevant layout and record needed. With each navigation button click, it'll keep creating a new window as long as there isn't another window already opened with the same info. If there is, it bring that one to the front. Not having any preference to where the window(s) are first positioned, I have all new ones created at Top:0; Left:150. This works fine and dandy, but after several windows have been 'opened' and presumed not to be moved around by the user, it gets difficult to determine what windows are already opened without moving a bunch around, because they are all stacked ontop of each other.

If a 'new' window is opened, I want to 'cascase' this one according to all of the other ones (that haven't been moved). For example - 1st window is Top:0; Left:150, 2nd window is Top:20; Left:170, 3rd window is Top:40; Left:190, etc.... I know that there is a script step 'Arrange All Windows', but I don't want my navigation window arranged with it, neither do I want the have the windows resized, just repositioned.

I'm thinking one way to do this is to write a loop that looks at all of the positions of all opened widows. If any window is at position Top:0; Left:150, then look at Top:20; Left:170, and so on up to six "levels" deep, until an open 'spot' is found, then plop it there. I've attempted to try such, but currently lack the brain capacity to do so. confused.gif Any thoughts concering this would be greatly appreciated. smile.gif

Posted

In order to keep your navigation menu from being affected by Arrange All Windows, you need to hide it when you run the script step, then select it in the script and restore it to it's proper coordinates.

See the example. It's an empty file but for the scripts (an open script and the new window script).

hth,

Tony

Cascade.fp7.zip

Posted

Ahh - that's pretty slick with the hide window. The problem is that the cascade resizes all of the windows (except the hidden one(s) ). I need them to be cascaded by position only. I don't want the size to be tampered with. I suppose I could cascade the windows, then resize them all. But that sounds like extra work I don't want to deal with, since each window is a different "initial" size. Plus it'll look funny for the .5 second that it's processing it. Any other ideas?

Posted

...could always create a table that stashes each window as a record, with it's position coordinates; relate the two with a key id; then treat each new window opened with a look at the prevous window coordinates + whatever you want to increment them by to set those coordinates. forgive me, I am babbling. ")

I'll see if I can do that. It's Friday and I can make it look like I'm actually working... smile.gif

Tony

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