你需要的选择样式,可以在Spread所提供的功能上进行一定的修改,比如通过下面的代码:
- public partial class Form1 : Form
- {
- public Form1()
- {
- InitializeComponent();
- }
- private void Form1_Load(object sender, EventArgs e)
- {
- fpSpread1.ActiveSheet.SelectionUnit = FarPoint.Win.Spread.Model.SelectionUnit.Row;
- fpSpread1.ActiveSheet.OperationMode = FarPoint.Win.Spread.OperationMode.RowMode;
- fpSpread1.FocusRenderer = null;
- }
- private void fpSpread1_SelectionChanged(object sender, FarPoint.Win.Spread.SelectionChangedEventArgs e)
- {
- fpSpread1.ActiveSheet.ActiveRow.Border = new FarPoint.Win.LineBorder(Color.Black, 2, false, true, false, true);
- }
- private void fpSpread1_SelectionChanging(object sender, FarPoint.Win.Spread.SelectionChangingEventArgs e)
- {
- fpSpread1.ActiveSheet.ActiveRow.ResetBorder();
- }
- }
复制代码 |