回复 1楼刘君的帖子
NoteStyle属性是指note隐藏和弹出的方式,和位置无关。
如果你想自定义note,只能使用noteSticky,并设置StickyNoteStyleInfo。
StickyNoteStyleInfo类里有提供Left和Top属性,用来设置Note的左边和上边距离。
代码参考:
- fpSpread1.ActiveSheet.SetNote(2, 0, "Head of Development");
- fpSpread1.ActiveSheet.Cells[2, 0].NoteStyle = FarPoint.Win.Spread.NoteStyle.StickyNote;
- FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo nsinfo = new FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo();
- nsinfo = fpSpread1.ActiveSheet.GetStickyNoteStyleInfo(2, 0);
- nsinfo.BackColor = Color.Bisque;
- nsinfo.Left = 100;
- fpSpread1.ActiveSheet.SetStickyNoteStyleInfo(2, 0, nsinfo);
复制代码 |