GetCss Method (HTMLCONTROL)
10.0A, PLBCMP GUI Only
The GetCss method retrieves the style of a HTML element. The method gets the requested style data from the HTML element that has an id attribute that matches the id parameter. This method uses the following format:
|
|
|
|
|
|
|
|
Where:
label
Optional. A Program Execution Label.
object
Required. A HTMLCONTROL that is accessed.
return
Optional. A Character String Variable that returns a string from a HTML element depending on the {name} data type.
Id
Required. A Character String Variable or literal that contains the HTML element id attribute.
name
Required. A Character String Variable or literal that identifies the type of data to be retrieved from the HTML element.
flags
Optional. A Numeric Variable or decimal value that specifies a bit mask value that controls the behavior of this method.
Flags Affected: EOS
Note the following:
CSS is a language that describes the style of an HTML object. This method retrieves a style value from an HTML element contained in a HTMLCONTROL object.
The EOS flag is set if the returned data string is larger than the DIM variable used to receive the data.
The {id} is a value that determines the HTML element used for data retrieval. The {id} string is matched against the id attribute of the HTML element.
The {name} identifies the type of data retrieved from the HTML element matching the {id} string. Information on HTML element CSS style names can be found at:
The {name} parameter is limited under Windows to the following styles:
background, backgroundAttachment, backgroundColor, backgroundImage, backgroundPosition, backgroundPositionX,
backgroundPositionY, backgroundRepeat, border, borderBottom, borderBottomColor, borderBottomStyle, borderBottomWidth,
borderCollapse, borderColor, borderLeft, borderLeftColor, borderLeftStyle, borderLeftWidth, borderRight,
borderRightColor, borderRightStyle, borderRightWidth, borderStyle, borderTop, borderTopColor, borderTopStyle,
borderTopWidth, borderWidth, bottom, clear, clip, color, cursor, direction, display, filter, font, fontFamily,
fontSize, fontStyle, fontVariant, fontWeight, height, left, letterSpacing, lineBreak, lineHeight, listStyle,
listStyleImage, listStylePosition, listStyleType, margin, marginBottom, marginLeft, marginRight, marginTop, maxHeight,
maxWidthminHeight, minWidth, overflow, overflow, overflowX, padding, paddingBottom, paddingLeft, paddingRight,
paddingTop, pageBreakAfte, pageBreakBefore, position, right, styleFloat, tableLayout, textAlign, textAlignLast,
textDecoration, textIndent, textJustify, textOverflow, textTransform, top, unicodeBidi, verticalAlign, visibility,
whiteSpace, width, wordBreak, wordSpacing, wordWrap, zIndex
If the {name} parameter is unsupported, invalid, or has never been set, an empty string can be returned.
The {flags} parameter is a bitmask value that forces specialized behaviors for the execution of this method.
The {return} string depends on the {name} data type being requested.
Example of GetCss Method:
In this example, the HTML CSS style named "whiteSpace" is retrieved from HTML element with the id attribute of "MyEdit".
The MyValue variable returns a string as follows:
See Also: HTMLControl Methods, Method Syntax
![]() |