Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.5
10.0
10.1
10.2
10.3
10.4
10.5
11.0
11.1
11.2
Statistic
FMM
Blog
DynaPDF.Table.SetCellText
Inserts the specified text into the cell.
Component |
Version |
macOS |
Windows |
Linux |
Server |
iOS SDK |
DynaPDF
|
3.5 |
✅ Yes
|
✅ Yes
|
✅ Yes
|
✅ Yes
|
✅ Yes
|
MBS( "DynaPDF.Table.SetCellText"; Table; Row; Col; HAlign; VAlign; Text )
More
MBS(
"DynaPDF.Table.SetCellText"; /* Inserts the specified text into the cell. */
$Table; /* The identifier for the table. */
$Row; /* The row number. Range from 0 to
DynaPDF.Table.GetNumRows-1.e.g. 0 */
$Col; /* The column number. Range from 0 to
DynaPDF.Table.GetNumCols-1.e.g. 0 */
$HAlign; /* The horizontal alignment. Can be left, center or right.e.g. "center" */
$VAlign; /* The vertical alignment. Can be bottom, center or top.e.g. "center" */
$Text) /* The text for the cell.e.g. "Hello World" */
Less
Parameters
Parameter |
Description |
Example |
Table |
The identifier for the table. |
$Table |
Row |
The row number. Range from 0 to DynaPDF.Table.GetNumRows-1. |
0 |
Col |
The column number. Range from 0 to DynaPDF.Table.GetNumCols-1. |
0 |
HAlign |
The horizontal alignment. Can be left, center or right. |
"center" |
VAlign |
The vertical alignment. Can be bottom, center or top. |
"center" |
Text |
The text for the cell. |
"Hello World" |
Result
Returns OK or error.
Description
Inserts the specified text into the cell.
Text is always a foreground object. The cell will be expanded if necessary.
Text can be processed in different ways. By default the text is output with WriteFText. WriteFText supports a lot of format tags. These tags are also supported in a table with exception of a page break tag. You can use DynaPDF.ConvertStyledText to convert FileMaker styled text.
To avoid line breaks it is possible to set the flag NoLineBreak with DynaPDF.Table.SetFlags. The flag is inherited from the table, column, row, and cell, in this order. If set, the text is output with WriteText instead. Since this function doesn't support format tags, the text is processed as plain text.
The font and font size can be set with DynaPDF.Table.SetFont and with DynaPDF.Table.SetFontSize. Note that a table has its own versions of these functions.
If the cell uses a landscape orientation then the text flows to left or to right depending on the orientation and if the flag NoLineBreak is not set. The row height must be set to value greater zero in this case. If the text does not fit into the cell then the column width will be expanded. If the flag NoLineBreak is set, then the height of the row will be expanded if necessary.
If the cell uses a portrait orientation and if the flag NoLineBreak is not set, then text flows from top to bottom or bottom to top, depending on the orientation. The row height will be expanded if necessary. If the flag NoLineBreak is set, then the column width will be expanded if necessary.
Examples
Sets the cell text:
MBS("DynaPDF.Table.SetCellText"; $table; $row; $col; "left"; "top"; Articles::Description1)
See also
Example Databases
Blog Entries
Created 18th August 2014, last changed 23th February 2021
DynaPDF.Table.SetCellTemplate
-
DynaPDF.Table.SetColWidth
Feedback: Report problem or ask question.