Gets the current typeface setting for editing columns with the RichText edit style.
DataWindow control
Integer dwcontrol.GetRichTextFaceName ( REF string typeface )
Argument |
Description |
---|---|
dwcontrol |
A reference to the DataWindow control |
typeface |
A string used to define the type |
Returns an integer to indicate whether the column that you selected has the RichText edit style and whether the content has one or more fonts applied.
0 Success
-1 No RichText column is being edited
-2 The selected text is a mix of fonts
You can call this method from a button in a custom toolbar that you use to obtain current font settings for columns with the RichText edit style.
This example obtains the typeface of the font to be used for editing columns with a RichText edit style:
Integer li_integer
String ls_string
li_integer = dw_1.GetRichTextFaceName(ls_string)
If Tahoma font is selected when the above script is called, ls_string is Tahoma and the method returns 0. If a mix of fonts is selected, ls_string is blank and the method returns –2.