TextPopup method

Purpose

Use the TextPopup method to open a pop-up window.

The instance of the HTML Help ActiveX control that you reference using the TextPopup method does not need to specify a command.

This method can be used with either a compiled help (.chm) file or uncompiled HTML files.

Applies to

This method is independent of any of the HTML Help ActiveX control commands.

Syntax

TextPopup(BSTR pszText, BSTR pszFont, int horzMargins, int vertMargins, COLORREF clrForeground, COLORREF clrBackground)


PARAM name Values
pszText A string variable that specifies the text to display in the pop-up window.
pszFont A string variable that specifies the following font attributes:
  • Font family
  • Point size
  • Character set
  • Color
  • Format options

The format is as follows:

Facename[, point size[, charset[, PLAIN BOLD ITALIC UNDERLINE]]]

The default font settings are: "Helvetica,12,,PLAIN"

horzMargins An integer that determines, in pixels, the side margins relative to the center of the pop-up window.
vertMargins An integer that determines, in pixels, the top and bottom margins relative to the center of the pop-up window.
clrForeground Specifies the color of the text in RRGGBB format. To specify the default text color (black), type -1.
clrBackground Specifies the background color of the pop-up window in RRGGBB format. To specify the default background color (pale yellow), type -1.

Example

The code for the control:


<OBJECT

id=test
type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"
>
</OBJECT>

The JavaScript code to specify the text and font variables:

<script>
FontFace="Verdana,8,,bold"
TopicText="This is an HTML Help pop-up window. This window can display text only."
TopicText2="This is another HTML Help pop-up window."
</script>

The JavaScript code to invoke the control:

<a href="JavaScript:test.TextPopup (TopicText, FontFace, 10,10,10,10)"> TextPopup Example</a>

Show Me

Comments


link to overview topic About the HTML Help ActiveX control methods