neu_BeyondTechn
在Spread for WinForms 中是通过 fpSpread1.FocusRenderer 属性控制选择单元格样式的,我不清楚日文版文档是在哪个章节介绍了该功能,不过你可以参考英文文档,有该功能的详细描述:
http://helpcentral.componentone.com/NetHelp/SpreadNet7/WF/spwin-cellfocusind.html
比如通过以下代码可以实现:
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- MyIndicator render = new MyIndicator();
- fpSpread1.FocusRenderer = render;
- }
- }
- public class MyIndicator : FarPoint.Win.Spread.IFocusIndicatorRenderer
- {
- public void Paint(System.Drawing.Graphics g, int x, int y, int width, int height, bool left, bool top, bool right, bool bottom)
- {
- SolidBrush r = new SolidBrush(Color.FromArgb(20,20,20,200));
- g.FillRectangle(r, x, y, width, height);
-
复制代码
可以实现这样的效果:
|