Using the Tab Style Page Templates > Tab Style Template Reference > Tab Style Template Functions > DspRtfFileSetName

DspRtfFileSetName

Sets the name of the rich text / text file that is to be displayed on the page based on the file_rtf template.

Syntax

DspRtfFileSetName(sFile [, iAN [, iMode [, iWidth [, iHeight [, sFontName [, iFontSize [, iFontColor [, iBackColor [, iWordWrap [, iScrollbars]]]]]]]]]])

sFile

The full path file name of the file to be displayed. The file can be in either Rich Text File (RTF) format or plain text format.

iAN

The AN where the CiTextBox ActiveX control is located. Do not specify this argument or set this to -1 to let the template handle the AN. Default value -1.

iMode

The display mode of the CiTextBox control. Default value 1.

You can use the combination of the above modes by adding the modes together.

The following parameters are internally used by the template. They are set to the defaults when the text box is initialized. They are not used on subsequent calls.

iWidth

Number of pixels of the width of the text box, defaults to 100 if not specified or -1.

iHeight

Number of pixels of the height of the text box, defaults to 100 if not specified or -1.

sFontName

Name of font used for plain text file, defaults to Arial if not specified or empty string.

iFontSize

Size of font used for plain text file, defaults to 10 point size if not specified or -1.

iFontColor

RGB value for the color of font (text), defaults to 0 (black) if not specified or -1.

iBackColor

RGB value for the background color of the text box, defaults to -1 (white) if not specified.

iWordWrap

whether to wrap text, applies to text file only, defaults to -1 (true) if not specified.

iScrollbars

Whether to show scroll bars on text box if the contents of the file exceeds the display size, defaults to 3 if not specified.

You can use the combination of the above modes by adding the modes together.

Return Value

Zero (0) if run successfully, otherwise error code is returned.

Related Functions

DspRtfFileGetAn, DspRtfFileGetName

See Also

Tab Template Functions