ColorToNr Method

[Top]  [Chapter]  [Previous]  [Next]

Applies to

IWPAttrInterface

Declaration

int ColorToNr(string ColorName);

Description

This method can be used to convert a color value defined by a string (same syntax as used by CSS) to a number which can be used by AttrSet or SetBGColorNr and SetColorNr.

Also see IWPAttrInterface.NrToColor which converts a color id into a string describing the color.

Example:

Memo.CurrAttr.SetFontSize(8);

Memo.CurrAttr.SetColorNr( Memo.CurrAttr.ColorToNr("red") );

TextCursor.InputText("Some red text");

Memo.CurrAttr.SetColorNr(-1);

 


[idh_iwpattrinterface_colortonr.htm]    Copyright © 2007 by WPCubed GmbH