WPTools Manual



Search


(press enter to search)

Function TWPStringBuilder.NextCSSType : TWPStringBuilderCSSElement

Unit: WPRTEPlatform
Class: WPRTEPlatform.TWPStringBuilder

Returns

The type of the result value is TWPStringBuilderCSSElement.

Description

Read simplified CSS - first read the type, then use CSSName, CSSColor, CSSString and CSSValue to get the name and value of the CSS data element.
Possible Result values are wpcssNone, wpcssColor, wpcssString, wpcssValue.


Example:
procedure TWPRTFSectionProps.ASetWPSS(const aWPCSSString: AnsiString); var str: TWPStringBuilder; t: TWPStringBuilderCSSElement; amode: Integer; begin str:=TWPStringBuilder.Create; str.Append(aWPCSSString); try if str.InitCSS then begin repeat t:=str.NextCSSType; case t of wpcssColor: begin
end; wpcssString: begin if CompareText(str.CSSName, 'Name') = 0 then FName:=str.CSSString end; wpcssValue: begin if CompareText(str.CSSName, 'Type') = 0 then FType:=TWPTextObjType(str.CSSValue) end; end; until t = wpcssNone; end; finally str.Free; end; end;