Contents
- Index
- Previous
- Next
ToggleAbsolutePositioning method
Declaration
function ToggleAbsolutePositioning: Boolean;
Description
Toggles the selected element between static positioning and absolute positioning.
This method is supported only for elements that can support a setting of "absolute" for the POSITION style attribute. In general, this includes containers such as <DIV>, <SPAN>, <MARQUEE>, and <TABLE> elements as well as images, HTML controls (buttons, text areas), objects, applets, and horizontal rules. Text outside of container elements cannot be positioned absolutely.
The method acts on the selection. The method adds a STYLE attribute to the selected element and sets the following style attributes: POSITION (which is set to "absolute"); TOP; and Z-INDEX. If the selection is already absolutely positioned, POSITION and Z-INDEX attributes are removed.
When the component is in Edit mode, the user can move an absolutely positioned element by selecting it and dragging it to a specific position on the page. After an element has been positioned the component updates the element's LEFT and TOP style attributes to reflect the new position.
Returns True on success. Returns False if a portion of the selection includes an element, such as text outside a division, that cannot be absolutely positioned. False is also returned if the selection includes only part of an element (such as a <SPAN> element) that can be positioned absolutely.
The following elements can be absolutely positioned:
APPLET
BUTTON
DIV
EMBED
FIELDSET
HR
IFRAME
IMG
INPUT
MARQUEE
OBJECT
SELECT
SPAN
TABLE
TEXTAREA
The method will have no effect on elements other than these.