Skip navigation
Currently Being Moderated

How to set grid alignment as "First line Only" for any paragraph style

Feb 27, 2012 4:29 AM

Tags: #indesign #paragraph #style #alignment #grid #first_line_only

Hi..Please help me out.

I have to set grid alignment as "First line only" for any paragraph style.

I am using the code below to set grid alignment as"All lines".

********************************************************************** ***********

            InterfacePtr<ITextAttributes> textAttributes(styleInfo, UseDefaultIID());

            InterfacePtr<ITextAttrGridAlignment> attrGridAlignment(::CreateObject2<ITextAttrGridAlignment>(kTextAttrGr idAlignmentBoss));




Here, I created text attribute of grid alignment and applied it to styleInfo of the style.

Now, the problem is that I have tried all the available values of Text::GridAlignmentMetric but none of them sets it to "First line only". Please tell me the solution of this problem. I am running out of time.

Thanks in advance.

  • Currently Being Moderated
    Feb 27, 2012 11:07 AM   in reply to Daves61

    Are you applying that attribute via kEditTextStyleCmdBoss or equivalent? If not, consider to do that.


    kGABaseline is what you need. In addition (see style edit dialog for an hint) you'll need kTAGridAlignOnlyFirstLineReportBoss - set the IID_ITEXTATTRBOOLEAN to true ...



    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points