ScrollBarShapeMark
A coloured rectangle or oval on a marker scroll bar, centred on the position it marks – the usual way to show an error, a warning or a search hit.
public class ScrollBarShapeMark : ScrollBarMarkBase
Inherits from / implements: ScrollBarMarkBase
Remarks
Set at least ScrollBarMarkBase.Value, ScrollBarMarkBase.Size and
StartColor: with the default empty size or colour nothing is visible.
Examples
searchBar.ScrollBarMarks.Add(new ScrollBarShapeMark
{
Value = matchLine,
Size = new SizeF(10, 3),
Alignment = ScrollBarMarkAlignment.Center,
StartColor = Color.Gold,
ShouldDrawBorder = true,
BorderColor = Color.DarkGoldenrod,
ToolTipInfo = "Match: \"" + searchText + "\"",
});
searchBar.Invalidate();Members at a glance
| Properties | |
|---|---|
EndColor | Gets or sets the second colour of the mark's gradient. |
LinearGradientAngle | Gets or sets the direction of the mark's gradient. |
RenderMode | Gets or sets whether the mark is filled with StartColor alone or with a gradient to
EndColor. |
Shape | Gets or sets the mark's shape. |
StartColor | Gets or sets the mark's fill colour, or the first colour of its gradient. |
| Methods | |
Dispose | Releases the brush the mark may hold. The same as ScrollBarMarkBase.Dispose(). |
Dispose | Releases the brush the mark may hold, however the mark is disposed – also through
IDisposable or a using statement. |
Properties
EndColor
Gets or sets the second colour of the mark's gradient.
- Value
- The default is
Color.Empty. Used only whenRenderModeisScrollBarShapedMarkMode.FillGradient.
LinearGradientAngle
Gets or sets the direction of the mark's gradient.
- Value
- In degrees clockwise from left-to-right: 0 runs
StartColortoEndColorfrom left to right, 90 from top to bottom. The default is 0.
RenderMode
Gets or sets whether the mark is filled with StartColor alone or with a gradient to
EndColor.
- Value
- The default is
ScrollBarShapedMarkMode.FillSolid.
Shape
Gets or sets the mark's shape.
- Value
- The default is
ScrollBarShapedMarkShape.Rectangle.
StartColor
Gets or sets the mark's fill colour, or the first colour of its gradient.
- Value
- The default is
Color.Empty, which is transparent; set a colour to see the mark.
See also
Methods
Dispose
Releases the brush the mark may hold. The same as ScrollBarMarkBase.Dispose().
Dispose
Releases the brush the mark may hold, however the mark is disposed – also through
IDisposable or a using statement.
Parameters
disposingtruewhen called fromScrollBarMarkBase.Dispose().