PdfTableSetBorderWidth(tblHandle As Integer, row As Integer, column As Integer, left As Double, top As Double, right As Double, bottom As Double) As Boolean

 

Sets the border width of the table, a row or cells

 

 

Parameters:

 

Name

Type

Description

tblHandle

Integer

The identification number (handle) of a table, obtained from the PdfTableCreate function.

row

Integer

The index of the row to set a border, first row is 0.

If row is -1, all rows are modified

column

Integer

The index of the column to set a border, first column is 0.

If column is -1, all columns are modified

left

Double

Strength of left border in points

top

Double

Strength of top border in points

right

Double

Strength of right border in points

bottom

Double

Strength of bottom border in points

 

Returns:

 

Type

Value

Description

Boolean

True or False

Returns True when border successfully has been applied

Returns False upon failure

 

Available in:

 

WindowMain

WindowLink

YES

YES

 

Used in:

 

XojoScript Name

GUID

Create Seminar Invoice With Slip As PDF

739DA58E-17EE-41CE-BB54-E7362CFE17D4

Create Seminar Invoice As PDF

2C3F7F29-A29A-4338-ACF5-51894B709DA5

 

Hint: You can find references to XojoScripts which make use of this function by sending the following SQL statement to the database:

Select id,GUID, ScriptName,ScriptCode from im_scripts where ScriptCode Like '%PdfTableSetBorderWidth%'

 

Example XojoScript:

 

// Create pdf file and add table with 5 rows

If PdfStart("testfile.pdf") > 0 Then

 

// Set top top-left as 0,0 coordinates

PdfSetPageCoordsTopDown

 

Dim hTbl As Integer = PdfTableCreate(1,1,200.0,9.0)

If hTbl >= 0 Then

 

// Set outer border around table (all cells)

Call PdfTableSetBorderWidth(hTbl,-1, -1, 0.5, 0.5, 0.5, 0.5)

 

// Set inner gridlines

Call PdfTableSetGridWidth(hTbl, 0.5,0.5)

 

// Add 5 rows of 15.0 points row height

Call PdfTableAddRows(hTbl,5,15.0)

 

// Set thicker cell border in first row only (0,0)

Call PdfTableSetBorderWidth(hTbl,0, 0, 1.5, 1.5, 1.5, 1.5)

 

// Draw the table to pdf, at coordinates x=30 y=30

Call PdfTableDraw(hTbl,30.0,30.0,0.0) // 0.0 = avoid pagebreaks

 

End If // hTbl >= 0

 

// Finalize PDF

Call PdfCloseFile

 

// Open PDF in default viewer

Call Pdflaunch

 

End If // PdfStart("testfile.pdf")