8 Replies Latest reply on Sep 9, 2011 1:18 PM by philmodjunk

    Aligning text in labels

    AmberSaundry

      Title

      Aligning text in labels

      Post

      Hi there,

      This probably seems like a silly question but I heve searched and can't find a good answer.  I am using FM Pro 9.

      I have a label layout in which I have related fields and I am formatting in terms of text alignment.  I have one line that has 2 fields on it, that I would like to display with an area larger than a space.  Right now, I just have a few 'extra' spaces in the layout, so it appears as such:

      Coll. #: <<Spec::Number>>     Date: <<Spec::Date>>

      However, sometimes if the Spec::Number field is long, this results in the Date field wrapping around to the next line - if possible I would always like these fields to stay on the same line.  I have tried doing 'full' text alignment through the Format menu, but this does not work, as sometimes the Number is so short that it does not 'trigger'.

      In short, is there any way I can make it so that these 2 fields appear on either ends of the line?  As in, I would like Number to always be left aligned, and Date to be right aligned?

      I hope that makes sense - I can clarify if necessary.  Any help is appreciated!

      Amber

        • 1. Re: Aligning text in labels
          philmodjunk

          Type a tab character in place of the space.

          Then set up a tab stop that is right aligned on the right hand limit of the space in which you want to print this data.

          • 2. Re: Aligning text in labels
            Sorbsbuster

            Or set Field 1 to the very left and set its text to be left alligned, and the Field 2 to the very right of the label and set it to be right aligned?

            • 3. Re: Aligning text in labels
              AmberSaundry

              Hi there,

              Thanks for your responses.  I cannot set field 1 to be left aligned and field 2 to be right alighed, as the text alignment affects the entire line of text?

              PhilModJunk, I tried setting up a tab stop that is right aligned on the right hand limit of the space in which I want to print this data, but it right aligns the end of the text header I have for the field, cutting off the actual field data.  As in, 'Date:' is right aligned, but <<Spec::Date>> is now off the print area.

              Am I missing something?

              Thanks as always,
              Amber

              • 4. Re: Aligning text in labels
                philmodjunk

                I cannot set field 1 to be left aligned and field 2 to be right aligned

                You can do this if you use two separate fields instead of a single line of text with merge fields in it.

                I tried setting up a tab stop

                Make the text header a separate block of layout text so that it is not part of this tab setting. Then set the tab for the remaining block of merge fields.

                • 5. Re: Aligning text in labels
                  AmberSaundry

                  Sorry, but what do you mean use two separate fields instead of a single line of text with merge fields in it?

                  I do not think I can make the text header a separate block of layout text, as this line is a part of a larger text body, that slides depending on the information present.  If I made it separate, wouldn't that mean it would not always align accordingly?  It looks like this:

                  Location: <<Spec::L_Location>><<Spec::L_Habitat>>
                  <<Spec::L_Altitude>>
                  <<Spec::L_Latitude>> <<Spec::L_Longitude>><<Spec::L_Grid Ref>>
                  Notes: <<Spec::Notes>>
                  Collector(s): <<Spec::L_Collectors>>
                  Collection No.: <<Spec::Number>> Date: <<Spec::Date>> (this is the line I am working on)
                  Determined by: <<Spec::Determined by>>

                  I tried to re-write this line, and it worked fine with no text formatting, aligning the text header & field to the right.  However, once I bolded the 'Date:' text header, it again aligned with only the text header, not text header & field.  Weird?

                  I tried creating a <<Spec::L_Date>> field, that was a calculation including the field header.  It aligned properly in layout mode, but once I switched to browse mode it again aligned with the text header. 

                  Thanks,
                  Amber

                  • 6. Re: Aligning text in labels
                    philmodjunk

                    You can break the above text into two parts. or even more by using object sliding, but now that I have a more complete understanding of what you have, I don't think that this is necessary. When you change some text from plain to bold, it now is wider than before. This could prevent the results you want in one of two ways: 1) It could move the tab character to the right of the specified tab stop position or 2) It could make the entire line of text too wide to fit on one line with the right justification.

                    There's no way I can tell from here which might be the case.

                    • 7. Re: Aligning text in labels
                      AmberSaundry

                      Hi Phil,

                      It looks like any change to the text is causing the problem.  After setting up the tab and it working fine in plain-text, I tried making the text size smaller - same problem.  Even with just changing the text colour!

                      There is something weird going on here, because when it jumps to the right, there are spaces in between Number & Date - when I hit backspace it does not remove these spaces, but deletes from where the tab stop is inserted.  Again weird.

                      I'm at a loss - at this point I think I may just need to admit defeat!

                      Thanks for all your help,
                      Amber

                      • 8. Re: Aligning text in labels
                        philmodjunk

                        Can you see the cursor when you hit backspace? A tab does not insert any space characters, so pressing backspace will either delete the invisible tab character or any other text to immediate left of the cursor. Since there is a right justify tab in place, deleting other text to the right of the tab character can produce the change you report here as the remaining text will slide to the right to be right justified to the position of the tab stop.

                        You are correct that many different text styles can change the horizontal space taken up by the text and this can affect whether the tab correctly positions the text where you want it.