PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN

WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
The HTMLClass property is used to read and change the value of the "class" HTML attribute of the control.
Remark: The value of the HTML "class" attribute is used to select the CSS styles applied to the control.
Example
// Applies a CSS to style the control if an error occurs
// and systematically targets the control to apply an auto-completion JS
IF Position(EDT_Edit, "@") = -1 THEN
   EDT_Edit.HTMLClass = "InputInError ui-autocomplete"
ELSE
   EDT_Edit.HTMLClass = "InputValid ui-autocomplete"
END
Syntax

Reading the value of the "class" attribute Hide the details

<Result> = <Control used>.HTMLClass
<Result>: Character string
Value of the "class" attribute. If this attribute contains several values, the different values are separated by spaces.
Remark: At runtime, the initial value of the "class" attribute corresponds to the concatenation of values defined during editing (with the space character as separator) in the control description window.
<Control used>: Control name
Name of the control to be used.

Modifying the value of the "class" attribute Hide the details

<Control used>.HTMLClass = <New value>
<Control used>: Control name
Name of the control to be used.
<New value>: Character string
New value for the "class" attribute. If this attribute contains several values, the different values are separated by spaces.
Caution:
  • This parameter is case-sensitive.
  • The existing content of the "class" attribute is overwritten with the new value.
Remarks
  • No check is performed on the value. In HTML, all the characters are allowed. If an invalid value is assigned, the browser will probably display the page with errors.
  • The "class" attribute in HTML also includes a specific content added by WEBDEV to define the style and make sure that the control works properly. This additional content cannot be accessed by the HTMLClass property.
Minimum version required
  • Version 20
Comments
Click [Add] to post a comment