Jump to content

myTable Javascript Issue


dleahy

Recommended Posts

Hello fellas,

 

Having a problem with a mystery indent...:confused:

 

var myTable = new FPTable; myTable.AddColumns(10000,28656); myTable.AddRows(1);

myTable.Rows[0].Cells[0].Font="Arial"; 
myTable.Rows[0].Cells[0].TextColor="Green"; 
myTable.Rows[0].Cells[0].PointSize="9"; 
myTable.Rows[0].Cells[0].Content ="Agenda:"; 
myTable.Rows[0].Cells[0].HAlign="left"; 

myTable.Rows[0].Cells[1].Font="Arial"; 
myTable.Rows[0].Cells[1].TextColor="Black";
myTable.Rows[0].Cells[1].PointSize="9";
myTable.Rows[0].Cells[1].Content= Field("Agenda");

return myTable.MakeTags();

 

Why does the text "Agenda:" have a space before it script is run during FP preview? (see attached screenshot)

Screenshot2012-04-18at1_05_01PM.png.aee67aa586100da0d6bc302f8bb3fc94.png

Link to comment
Share on other sites

Try adjusting the margins of your table:

 

var myTable = new FPTable; myTable.AddColumns(10000,28656); myTable.AddRows(1);

myTable.Rows[0].Cells[0].Font="Arial"; 
myTable.Rows[0].Cells[0].TextColor="Green"; 
myTable.Rows[0].Cells[0].PointSize="9"; 
myTable.Rows[0].Cells[0].Content ="Agenda:"; 
myTable.Rows[0].Cells[0].HAlign="left"; 
[color="Red"]myTable.Rows[0].Cells[0].Margins = new FPTableMargins;
myTable.Rows[0].Cells[0].Margins.Top = 60;
myTable.Rows[0].Cells[0].Margins.Bottom = 60;
myTable.Rows[0].Cells[0].Margins.Left = 0;
myTable.Rows[0].Cells[0].Margins.Right = 0;[/color]

myTable.Rows[0].Cells[1].Font="Arial"; 
myTable.Rows[0].Cells[1].TextColor="Black";
myTable.Rows[0].Cells[1].PointSize="9";
myTable.Rows[0].Cells[1].Content= Field("Agenda");

return myTable.MakeTags();

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...