回复 1楼p332718873的帖子
>>1.怎么设置单元格样式?gcSpreadSheet1.Sheets[0].Cells[0, 0].BorderBottom 属性是只读的,有没有参考代码?(边框,字体,颜色什么的)。
- GrapeCity.Windows.SpreadSheet.Data.Cell acell;
- acell = gcSpreadSheet1.Sheets[0].Cells[0, 0];
- acell.Background = new System.Windows.Media.SolidColorBrush(Color.FromArgb(200, 180, 50, 25));
- acell.Focusable = true;
- acell.ShrinkToFit = true;
- acell.Foreground = new System.Windows.Media.SolidColorBrush(Color.FromArgb(255, 215, 100, 125));
- gcSpreadSheet1.Sheets[0].Cells[1, 1].BorderTop = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100));
- gcSpreadSheet1.Sheets[0].Cells[1, 1].BorderLeft = new GrapeCity.Windows.SpreadSheet.Data.BorderLine();
- gcSpreadSheet1.Sheets[0].Cells[1, 1].BorderRight = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot);
- gcSpreadSheet1.Sheets[0].Cells[1, 1].BorderBottom = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200));
- GrapeCity.Windows.SpreadSheet.Data.CellRange r;
- r = new GrapeCity.Windows.SpreadSheet.Data.CellRange(2, 2, 2, 2);
- //gcSpreadSheet1.Sheets[0].SetBorder(r, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25,25,200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All);
- gcSpreadSheet1.Sheets[0].SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25, 25, 200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All);
- gcSpreadSheet1.Sheets[0].Columns[5].BorderTop = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100));
- gcSpreadSheet1.Sheets[0].Columns[5].BorderLeft = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5));
- gcSpreadSheet1.Sheets[0].Columns[5].BorderRight = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot);
- gcSpreadSheet1.Sheets[0].Columns[5].BorderBottom = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200));
- gcSpreadSheet1.Sheets[0].SetBorder(r, GrapeCity.Windows.SpreadSheet.Data.SheetArea.Cells, new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(25, 25, 200)), GrapeCity.Windows.SpreadSheet.Data.SetBorderOptions.All);
- gcSpreadSheet1.Sheets[0].Rows[5].BorderTop = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(100, 50, 100));
- gcSpreadSheet1.Sheets[0].Rows[5].BorderLeft = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5));
- gcSpreadSheet1.Sheets[0].Rows[5].BorderRight = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 122, 5), GrapeCity.Windows.SpreadSheet.Data.BorderLineStyle.DashDot);
- gcSpreadSheet1.Sheets[0].Rows[5].BorderBottom = new GrapeCity.Windows.SpreadSheet.Data.BorderLine(Color.FromRgb(255, 50, 200));
复制代码
>>2.我的Sheet怎么不支持Ctrl+X,C,V的操作?选中区域后Ctrl+X界面无变化
界面无变化不代表没有cut 或者 copy, 请执行paste 操作查看是否cut 和copy 起作用了。 |