ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage properties / Properties associated with windows, pages and controls
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 reads and sets 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 the values defined in the editor (with spaces as separators), in the control description window.
<Control used>: Control name
Name of the control to be used.

Changing 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 of 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
  • The value is not checked. 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

Last update: 09/08/2023

Send a report | Local help