display Property

Microsoft FrontPage Visual Basic

display Property

Sets or returns a String that represents whether or not the browser displays the object.

expression.display

expression    Required. An expression that returns one of the objects in the Applies To list.

Remarks

The String value for the display property can be one of the following:

block The browser displays the object as a block element.
none The browser doesn't not display the object.
inline The browser displays the object as an inline element sized by the dimensions of the content.
list-item The browser displays the object as a block element and includes a list-item marker.
table-header-group The browser displays the table header before all other rows and row groups, after any captions, and spans the top of each page with the table header.
table-footer-group The browser displays the table footer before all other rows and row groups, before any captions, and spans the top of each page with the table footer.

Example

The following example inserts an image, and then specifies that the image will not display in the browser. This example assumes that you have an image file called "chelan.jpg" in a folder called "images." When you run this example, replace the image file name with an actual image file name.

    Sub SetDisplayProperty()
    Dim objImage As FPHTMLImg

    ActiveDocument.activeElement.insertAdjacentHTML where:="afterbegin", _
        HTML:="<img id=""newimage"" src=""chelan.jpg"">"

    Set objImage = ActiveDocument.body.all.tags("img").Item("newimage")

    objImage.Style.display = "none"
End Sub