作成日: 2026/06/24 最終更新日: 2026/06/24
文書種別
使用方法
詳細
コントロールのSelectionBackgroundプロパティやSelectionBackgroundUnfocusedプロパティを使用して、セル範囲を選択したときの背景色を設定しても、設定色よりも薄い色で表示されます。これは選択時の背景色の不透過率が既定で0.1に設定されているためです。
背景色を透過させず、設定色のまま表示するには、SelectionBackgroundOpacityプロパティを1に設定します。
◎サンプルコード(VB)
GcSpreadGrid1.SelectionBackground = Brushes.Yellow
GcSpreadGrid1.SelectionBackgroundUnfocused = Brushes.Gray
GcSpreadGrid1.SelectionBackgroundOpacity = 1
◎サンプルコード(C#)
gcSpreadGrid1.SelectionBackground = Brushes.Yellow;
gcSpreadGrid1.SelectionBackgroundUnfocused = Brushes.Gray;
gcSpreadGrid1.SelectionBackgroundOpacity = 1;
関連情報