FlexGrid for WinForms
ScrollBarAnnotationsUpdated イベント
使用例 

C1.Win.FlexGrid.10 アセンブリ > C1.Win.FlexGrid 名前空間 > C1FlexGridBase クラス : ScrollBarAnnotationsUpdated イベント
スクロールバー注釈が更新された後に発生します。
シンタックス
'宣言
 
Public Event ScrollBarAnnotationsUpdated As System.EventHandler(Of ScrollBarAnnotationsUpdatedArgs)
public event System.EventHandler<ScrollBarAnnotationsUpdatedArgs> ScrollBarAnnotationsUpdated
イベント データ

イベント ハンドラが、このイベントに関連するデータを含む、ScrollBarAnnotationsUpdatedArgs 型の引数を受け取りました。次の ScrollBarAnnotationsUpdatedArgs プロパティには、このイベントの固有の情報が記載されます。

プロパティ解説
注釈コレクションへの参照を取得します。  
使用例
イベント引数 ScrollBarAnnotationsUpdatedArgs で、すべてのグリッド注釈のリストにカスタム注釈を追加できます。
public enum CustomAnnotationType
{
Custom1,
Custom2
}

public class CustomAnnotation : ScrollBarAnnotation
{
public CustomAnnotationType Type { get; }
public CustomAnnotation(CustomAnnotationType type, string text, double position, Color? color = null,
HorizontalAlignment alignment = HorizontalAlignment.Center, int width = 100, int height = 2) :
base(text, position, color, alignment, width, height)
{
Type = type;
}
}

private void C1FlexGrid1_ScrollBarAnnotationsUpdated(object sender, ScrollBarAnnotationsUpdatedArgs e)
{
ScrollBarAnnotation customAnnotation = e.Annotations.FirstOrDefault(x => x is CustomAnnotation ca && ca.Type == CustomAnnotationType.Custom1);
var text = $"Custom annotation. Time: {DateTime.Now.ToLongTimeString()}";
if (customAnnotation == null)
{
e.Annotations.Add(new CustomAnnotation(CustomAnnotationType.Custom1, text, 11, Color.Green, width: 70, height: 8));
e.Annotations.Add(new CustomAnnotation(CustomAnnotationType.Custom2, text, 55, Color.YellowGreen, width: 70, height: -1));
}
else
{
customAnnotation.Text = text;
}
}
参照