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

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

Recommended Posts

Posted

Is there a way to select a group of fields or objects and move them to a new location through a script? I've been pondering this for a few days and am not seeing the way.

Much appreciated,

Nati

Posted

what i would like is a user to be in browse, click on a button and have a script run that moves fields a bit left or right, up/down, etc. anything like that?

thanks,

nati

Posted

yes, trying to allign a printout with a pre printed form

quote:

Originally posted by dykstrl:

It sound like you're trying to deal with a printing issue or a screen size issue.

Posted

Brute force method: create lots of different layouts that are variations, and use scripts for the user to select from between them.

Posted

thanks, that's what i've been doing but I notice that some competing products designed in Access have a nifty adjuster that I was hoping FM had. Back to designing layouts!

Posted

You should be able to get it to print consistently on different printers as long as you set fixed page margins that are larger than the minimum for any of the printers. I reckon 1.5cm top; 2cm bottom and 1.5cm for left and right.

Posted

Just a thought: If you group all the fields on your layout together and then select the sliding option, and then create a small global container field which is above and to the left of the rest of the layout items, and set it to slide up and left, you will be able to shift the layout up-down and left-right by inserting various sized graphics into it. Just make up a combination of varying width and height rectangles that are white so they are not visible; put them in a related file. Then use a script to retrieve the correct size graphic and put it into the container field. It will be a bit tedious to set up, but should work.

Posted

thanks for the tips!

the container idea is eluding me. how do i tell it to retrieve a container?

all help appreciated!

nati

Posted

Before I go any further I should mention that the effects of this will only be visible in preview mode and on the printout. It won't show up in browse mode.

Set up a related file with two fields, an ID field (which will be the link to the main file) and the container field. Put all your variable sized objects in individual records. Create a unique ID number for each one so that you can identify the graphic. Assuming that you want to allow 10 increments both vertically and horizontally, you will need 10x10=100 records. I would arrange them like this:

code:


ID GraphicSize(WxH)

--------------------

0 1x1

1 2x1

2 3x1

.

.

etc.

.

.

9 10x1

10 1x2

11 2x2

12 3x2

.

.

etc.

.

.

97 8x10

98 9x10

99 10x10


If you set up a relationship on the ID field, then all you need to do is display the related container field on the layout. To change the graphic, you just change value in the linked field in the main file (let's call it IDmain; it can be a global number field).

You can set up your nudge buttons to change the value of IDmain as follows:

Left:

Set Field IDmain=IDmain-If(Mod(IDmain)=0,0,1)

Right:

Set Field IDmain=IDmain+If(Mod(IDmain)=9,0,1)

Up:

Set Field IDmain=IDmain-If(IDmain < 10,0,10)

Down:

Set Field IDmain=IDmain+If(IDmain > 89,0,10)

What this does is add or subtract 1 from the graphic ID for horizontal movement, and add or subtract 10 for vertical movement. If your graphic shapes and ID's are arranged as I described above, this will allow changing the vertical position without affecting horizontal and vice versa. The If statements prevent the user from incrementing more than 10 either horizontally or vertically.

Hope this helps. smile.gif

[This message has been edited by BobWeaver (edited February 24, 2001).]

Posted

I should also mention that the container field that goes on your printing layout should be sized at least as big as the largest object that will go in, and it should be formatted to "Crop".

Also, I only did a quick test of this. So, before you spend a lot of time on this, try playing around with a much simplified version (ie, manually cut and paste various sized objects into a container field on your layout and check the results, before going the whole 9 yards).

[This message has been edited by BobWeaver (edited February 24, 2001).]

Posted

I was just looking at this again, and I realized that I made it more complicated than necessary. It's actually easier to put two containers on the layout. One at the top of the page to adjust vertical offset, and one one the left side of the page to adjust horizontal. Then you only need 10 different sized graphics for all possible positions. They are: 1x1, 2x2, 3x3,....up to 10x10.

Give them ID numbers from 0 to 9. Set up two global number fields in the main file, gHorOffset, and gVertOffset. Set up two relationships to the container file called HorOffset based on gHorOffset and one called VertOffset based on gVertOffset. The top container field will be VertOffset::GraphicField, and the left container field will be HorOffset::graphicField. Then you can move vertically by adjusting the value of gVertOffset between 0 and 9. And, you can independently move horizontally by adjusting the gHorOffset value between 0 and 9.

Posted

Since this was on my mind anyway, I decided to try adding this feature to a layout that I was setting up to print out Canadian T4 tax forms. I found out that just grouping all the fields together doesn't work. The only way I could get it to work was to place a bunch of white boxes running from the left edge of each field over to the left edge of the layout, and a bunch more from the top edge of each field up to the top of the layout. Then I did a "send to back" to all of them so they don't hide any fields. I had to do this in order to prevent everything from sliding around separately. What a mess! It did finally work, but I'm not sure it's worth the trouble. I can send you a copy of my file if you want.

  • 2 weeks later...

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