HasFlowLayout method

Gets a value that indicates whether an element is a flow layout element.


HRESULT retVal = object.HasFlowLayout(pIElement, pfHasFlowLayout);


pIElement [in]

Type: IHTMLElement

A pointer to an IHTMLElement interface that specifies the element to check for flow layout.

pfHasFlowLayout [out]

Type: BOOL

A pointer to a variable of type BOOL that receives TRUE if the element can wrap its content, or FALSE otherwise.

Return value


If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


This method sets pfHasFlowLayout to TRUE for a body element, because a body element wraps its contents from line to line as it's rendered. This method sets pfHasFlowLayout to FALSE for a table element, because a table does not wrap; instead, it has a fixed number of rows and columns. This method sets pfHasFlowLayout to TRUE for the td elements of a table, because their contents wrap in the td element.

Note  Any element that can contain text can be converted into a flow layout container by assigning a width or height attribute to the element, which makes the element rectangular. For example, a strong element typically does not have flow layout, but the following strong element does.

<strong style="height: 20px; width: 40px;">