TW3CSSClassStyleNames

From Smart Mobile Studio
Jump to: navigation, search


Unit: W3CssNames.pas


Hierarchy
TObject
TW3OwnedObject
TW3CSSClassStyleNames
Properties
Property-icon.png Count
Property-icon.png Items
Methods
Method-icon.png Add
Method-icon.png Clear
Method-icon.png RemoveByName
Method-icon.png toString


Properties

Property-icon.png Count

Determine number of class names assigned to component.

property Count: Integer read getCount;

Remarks:

Default class name assigned upon object creation is also included in result.


Example:

W3Panel1.CSSClasses.Add('button');
W3Panel1.CSSClasses.Add('order');
W3Panel1.InnerText := IntToStr(W3Panel1.CSSClasses.Count);

Result:

3


Property-icon.png Items

Get or sets class name at specified index.

property Items[index: Integer]: String read getItem write setItem;

Parameters:

index

Integer
Index of CSS class name (zero-based).

Methods

Method-icon.png Add

Add specified class name into string array.

function Add(aCSSClassName: String): Integer;

Parameters:

aCSSClassName

String
Name of class to be added.

Method-icon.png Clear

Clear CSS class names array, including default class name.

procedure Clear;

Method-icon.png RemoveByName

Remove CSS class with specified name from object. Return name of class if class with specified name exist.

function RemoveByName(aCSSClassName: String): String;

Parameters:

aaCSSClassName

String
Name of class to be removed.


Method-icon.png toString

Compute all class names into one string.

function toString: String;

Example:

W3Panel1.CSSClasses.Add('button');
W3Panel1.CSSClasses.Add('order');

Result:

TW3Panel button order