Type | Description | |||
Boolean | A boolean expression that indicates whether the control displays on the control's vertical scroll bar a line for each keyword/expression defined. |
The following VB sample defines the // TODO expressions, and marks on the control's vertical scroll bar each position of the // TODO expression in the control's text:
With Edit1 .AllowMark = True .AddExpression "<fgcolor=000080>// TODO</fgcolor>", "<b><fgcolor=000080> </fgcolor></b>", "" .MarkColor("// TODO") = RGB(0, 0, &H80) .Refresh End With
As you can see from the following screen shot, there are lines ( on the control's vertical scroll bar ) that marks the position for each // TODO expression in the text.
The following C++ sample marks the position of the // TODO expressions on the control's vertical scroll bar:
COleVariant vtMissing; vtMissing.vt = VT_ERROR; m_edit.SetAllowMark( TRUE ); m_edit.AddExpression("<fgcolor=000080>// TODO</fgcolor>", "<fgcolor=000080> </fgcolor>", "", vtMissing, vtMissing ); m_edit.SetMarkColor("// TODO", RGB(0, 0, 0x80) ); m_edit.Refresh();
The following VB.NET sample marks the position of the // TODO expressions on the control's vertical scroll bar:
With AxEdit1 .AllowMark = True .LineNumberWidth = -1 .AddExpression("<fgcolor=000080>// TODO</fgcolor>", "<b><fgcolor=000080> </fgcolor></b>", "") .set_MarkColor("// TODO", ToUInt32(Color.FromArgb(0, 0, &H80))) .CtlRefresh() End With
where the ToUInt32 function converts a Color expression to an OLE_COLOR expressions:
Shared Function ToUInt32(ByVal c As Color) As UInt32 Dim i As Long i = c.R i = i + 256 * c.G i = i + 256 * 256 * c.B ToUInt32 = Convert.ToUInt32(i) End Function
The following C# sample marks the position of the // TODO expressions on the control's vertical scroll bar:
axEdit1.AllowMark = true; axEdit1.AddExpression("<fgcolor=000080>// TODO</fgcolor>", "<b><fgcolor=000080> </fgcolor></b>", ""); axEdit1.set_MarkColor("// TODO", ToUInt32(Color.FromArgb(0, 0, 0x80))); axEdit1.CtlRefresh();
where the ToUInt32 function converts a Color expression to an OLE_COLOR expressions:
private UInt32 ToUInt32(Color c) { long i; i = c.R; i = i + 256 * c.G; i = i + 256 * 256 * c.B; return Convert.ToUInt32(i); }
The following VFP sample marks the position of the // TODO expressions on the control's vertical scroll bar:
With thisform.Edit1.Object .AllowMark = .t. .AddExpression("<fgcolor=000080>// TODO</fgcolor>", "<b><fgcolor=000080> </fgcolor></b>", "") .MarkColor("// TODO") = RGB(0, 0, 128) .Refresh EndWith