回复 1楼tfy168的帖子
单元格的边框可以用Cell.Border的属性去更改,在MouseClick事件里去获取当前单元格的行号、列号,然后去更改这个单元格的边框。代码参考:
- private void c1FlexGrid1_MouseClick(object sender, MouseEventArgs e)
- {
- int row = this.c1FlexGrid1.Row;
- int col = this.c1FlexGrid1.Col;
- CellStyle cs = this.c1FlexGrid1.GetCellStyleDisplay(row, col);
- cs.Border.Color = Color.Red;
- }
复制代码
Focus在的位置的Focus的Rectangle可以用C1FlexGrid.FocusRect属性来设置,比如:
this.c1FlexGrid1.FocusRect = FocusRectEnum.Solid; |