windowsforms-120753-common-features-behaviors-scrollbar-annotation-behavior.md
You can display scrollbar annotations in a list box control to indicate the following items’ location:
The code below shows how to enable scrollbar annotations for focused and selected rows in an image list box.
using DevExpress.Utils.Behaviors;
behaviorManager1.Attach<ScrollAnnotationsBehavior>(imageListBoxControl1, behavior => {
behavior.Properties.Type = ScrollAnnotationType.Focus | ScrollAnnotationType.Selection;
});
Imports DevExpress.Utils.Behaviors
behaviorManager1.Attach(Of ScrollAnnotationsBehavior)(imageListBoxControl1, Sub(behavior)
behavior.Properties.Type = ScrollAnnotationType.Focus Or ScrollAnnotationType.Selection
End Sub)
Tip
You can handle the BaseListBoxControl.CustomDrawScroll event to draw custom annotations for specific scrollbar positions.
See Also