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

PLEASE HELP! Is this possible?


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

Recommended Posts

  • Newbies
Posted

I want to be able to take four text fields, each of varying width, one above

the other in a block that are center justified, and then have this entire

block set to print in my print layout flush right with the page margin while

retaining the blocks center justification. In other words, a center

justified text block flush right with the right page margin.

  • Newbies
Posted

I have tried this, but when I tell the field to center justify it moves the text away from the margin. Am I forgetting something in my calculation? Thanks for your reply!

Posted

When you format the text as centered, it will center it with respect to the center of the field's box. The only thing you can do is try to reduce the field box so that it's a little closer to the size of the longest piece of text that it may contain.

The only workaround that I know of is to use a monospaced font like Courier and insert spaces as necessary to make the text centered. Like so:

cMaxLength=Max(Length(TextField1),Length(TextField2),Length(TextField3),Length(TextField4))

cTextField1=TextField1 & Left(" ",Int((cMaxLength-Length(TextField1))/2))

cTextField2=TextField2 & Left(" ",Int((cMaxLength-Length(TextField2))/2))

cTextField3=TextField3 & Left(" ",Int((cMaxLength-Length(TextField3))/2))

cTextField4=TextField4 & Left(" ",Int((cMaxLength-Length(TextField4))/2))

Now line up cTextField1 through cTextField4 one above other at the right margin and format them as right justified.

Posted

There are two ways to accomplish this:

1) use marker fields. in your layout, create a simple text block. You need to surround the FIELD NAME in double angle brackets. for instance, if your four fields are named Text1, Text2, Text3, Text4, you should create text block. in that text block, do this:

<<Text1>>

<<Text2>>

<<Text3>>

<<Text4>>

and center-align that text block. You can then position that whole block wherever you want.

2) Create a new calculation field Text1234, set it to:

Text1234 = Text1 & "

Posted

Won't work because the text still remains centered with respect to the bounding box of the text field, so it won't slide up tight to the right margin.

One other possibility is to create several calculated fields each of which is arranged on the layout in increasing widths. For example:

DisplaySize01 = case(Size=1,"Field1"&"

Posted

It seems to me that you want what PageMaker used to call "force justify" where the word/sentence is s-t-r-e-t-c-h-e-d out from margin to margin by increasing the word and letter spacing. (It looks ugly IMHO but that's not the point.)

There is no direct way to do this in FMP. A calculation could be done that inserts extra spaces between words and letters, but getting it automated is going to be a real challenge in anything but a mono-spaced font.

There is one other idea.. an *image* of the text could be resized to simulate the effect, but the shape of the characters will be distorted.

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