SetCss Method (HTMLCONTROL)
10.0A, PLBCMP GUI Only
The SetCss method changes the style of an HTML element in an HTMLCONTROL object. The method sets the requested style of 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 Numeric Variable that always returns zero.
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 CSS style to be changed in the HTML element.
value
Required. A Character String Variable or literal that has the value string applied to the {name} data type.
flags
Optional. A Numeric Variable or decimal value that specifies a bit mask value that controls the behavior of this method.
Flags Affected: OVER, ZERO
Note the following:
CSS is a language that describes the style of an HTML object. This method sets a style value of an HTML element contained in a HTMLCONTROL object.
The ZERO flag is always set TRUE.
The OVER flag is always set FALSE.
The {id} is a value that determines the HTML element used for data changed. The {id} string is matched against the id attribute of the HTML element.
The {name} identifies the style to be changed in 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
The valid values for the {value} parameter depends on the {name} parameter used.
The {flags} parameter is a bitmask value that forces specialized behaviors for the execution of this method.
The {return} value will always be zero.
Example of SetCss Method:
In this example, the HTML CSS style named "whiteSpace" is set to the value pre for the HTML element with the id attribute of "MyEdit".
See Also: HTMLControl Methods, Method Syntax
![]() |