4D Write v16

WR Get stylesheet text prop

Home

 
4D Write v16
WR Get stylesheet text prop

WR Get stylesheet text prop 


 

WR Get stylesheet text prop ( area ; stylesheetNumber ; property ; applyTo ) -> Function result 
Parameter Type   Description
area  Longint in 4D Write area
stylesheetNumber  Longint in Stylesheet number
property  Integer in Number of the text property to read
applyTo  Integer in
Function result  Real in Depends on the property parameter

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 no 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.

Example  

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



See also 

WR SET STYLESHEET TEXT PROP

 
PROPERTIES 

Product: 4D Write
Theme: WR Style Sheet
Number: 89460

 
HISTORY 

Created: 4D Write 6.5

 
ARTICLE USAGE

4D Write Language ( 4D Write v16)