Section
AddPicture
Description
Adds a picture to the body of a section.
Minimum FH Version
7 except that the bForceFull parameter, if used, requires version 8
as a minimum.
Syntax
bOK = sn:AddPicture(item, iCategory[, sCaption[, ind [,bForceFull]]])
Parameters
- item
- Item pointer: must point to a Media Object record, or to a link to a Media Object record
- iCategory
- Integer: Picture category. Value must be in the range 1 to 5. The default labels for these categories in the Pictures tab of the Report Options dialog, are as follows: 1 = Individual, 2 = Spouse Family, 3 = Spouse, 4 = Child, 5 = Other. However, all 5 categories can be used in whatever way a report plugin needs to use them, and by setting an appropriate value for the "picture_categories" value in the FH_Requirements function, a report can arrange for the category labels, in the Picture tab of Report Options, to be re-labelled appropriately.
- sCaption
- Text string or nil: Optional. Defaults to nil if not supplied. Only supply a caption if you do not want a caption to be generated automatically (which it will be if sCaption is nil).
- ind
- Item pointer: Optional. If it points to an Individual record, this is the Individual that will be used for age calculations when generating the caption. Is ignored if a caption is supplied.
- bForceFull
- Boolean: Optional. Defaults to false if not supplied.
Ordinarily, when a picture is displayed, if the item is associated
with a frame, the frame will be displayed. If the item has no
associated frame, the full image will be displayed. If you
want the full image to be displayed even if the item is associated
with a frame, set bForceFull to true.
Return Value
- bOK
Remarks
Example
bOK = sn.AddPicture(pitem, 1, nil, ind)