• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How do I update the tabstop information on a pgf

New Here ,
May 04, 2015 May 04, 2015

Copy link to clipboard

Copied

I have>        

    var  doc=app.ActiveDoc;    

                SelectElement (doc, para);      

                 var textRange = new TextRange;

                textRange.beg.obj = textRange.end.obj = para;

                textRange.beg.offset = 1;

                textRange.end.offset = Constants.FV_OBJ_END_OFFSET;

                doc.TextSelection = textRange;

                textRange = doc.TextSelection;

                var pgf = doc.TextSelection.beg.obj;

and now I need to set the tab stop New Position to a variable value, the alignment to left and the leader to .

any help appreciated, thanks!

Tracey

TOPICS
Scripting

Views

260

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 05, 2015 May 05, 2015

Copy link to clipboard

Copied

LATEST

Hi Tracey, Here is some code that should get you moving in the right direction. Please let me know if you have any questions or comments. Thanks. -Rick

#target framemaker

// Make a constant for the points metric value. 

var PT = 65536; 

// Set a variable for the active document.

var doc = app.ActiveDoc;

// Set a variable for the paragraph containing the insertion point.

var pgf = doc.TextSelection.beg.obj;

// Set the paragraph's current Tabs to a variable.

var tabs = pgf.Tabs;

// Make a Tab object and set its properties.

var tab = new Tab ();

tab.x = 288 * PT; // 4 inches

tab.type = Constants.FV_TAB_LEFT; // Align left

tab.leader = "."; // Leader set to dot.

// Push the new tab to the end of the Tabs variable.

tabs.push (tab);

// Apply the updated Tabs variable to the paragraph.

pgf.Tabs = tabs;

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines