IHTMLDocument3::dir Property

Sets or retrieves a value that indicates the reading order of the object.

Syntax

HRESULT IHTMLDocument3::get_dir(BSTR *p);
HRESULT IHTMLDocument3::put_dir(BSTR v);

Parameters

  • p
    Pointer to a variable of type BSTR that receives one of the values listed in Possible Values.
  • v
    BSTR that specifies one of the values listed in Possible Values.

Possible Values

ltr Default. Content flows from left to right.
rtl Content flows from right to left.

Return Value

Returns S_OK if successful, or an error value otherwise.

Remarks

The IHTMLDocument3::dir property does not affect alphanumeric characters in Latin documents. These characters always render ltr. However, the property does affect punctuation characters in Latin documents. For example, punctuation marks such as periods and question marks will render to the left of a sentence when the IHTMLDocument3::dir property is set to rtl.

The value of IHTMLDocument3::dir property has no effect on the orientation of coordinates for an object's positioning properties. For example, the left property and the right property perform the same placement in both cases. However, when both the left and right properties are specified, the left property takes precedence when the IHTMLDocument3::dir property is set to ltr. Likewise, the right property takes precedence when the IHTMLDocument3::dir property is set to rtl.

See Also

IHTMLStyle2::direction, HTML Character Sets