Command WR Get stylesheet text prop

4D Write

WR Get stylesheet text prop

version 6.5


WR Get stylesheet text prop (area; stylesheetNumber; property; applyTo) Real

ParameterTypeDescription
areaLongint4D Write area
stylesheetNumberLongintStylesheet number
propertyIntegerNumber of the text property to read
applyToInteger0=the property is not applied
1=the property is applied

Function result Real Depends on the property parameter

Description

The WR Get stylesheet text prop command allows you to know, for area, whether the property passed in property is applied to the selection.

property

If property = 7 ( wr font number Constant), the returned value is an internal number. 4D Write sequentially assigns font numbers to fonts as they are used. This number can only be used by the WR SET STYLESHEET TEXT PROP command. It is recommended that you should use the WR Get stylesheet font and WR SET STYLESHEET FONT whose operation is based on font names.

The property 15 (wr stylesheet number Constant) has not meaning for this function.

If property = 64 (wr tab Constant), WR Get stylesheet text prop returns the number of tab stops set for the style sheet.

For color properties, the returned value will respect the following format (as in 4D and in the former version of 4D Write): 0x00RRGGBB. To separate the RGB values, use the WR COLOR TO RGB command.

If -1 is returned for the properties 11 (wr strikethrough color Constant), 12 (wr underline color Constant), or 13 (wr shadow color Constant), these elements are in the same color as the text.

If -1 is returned for the property 10 (wr text back color Constant), there is no background color selected for the text.

Note: property can be set using constants.

The list of the text properties constants are available in the "WR Text properties" constants theme. You can either pass a constant name or its values.

• If applyTo is equal to 1, the style sheet takes into account the property.

• If applyTo is equal to 0, the style sheet does not take into account the property.

Examples

See the examples for the WR UPDATE STYLESHEET, WR GET STYLESHEET TAB commands.

See Also

WR SET STYLESHEET TEXT PROP.