回复 9楼Hjr2350的帖子
StickyNoteStyleInfo 适用于 任何类型的 NoteStyles,请使用以下代码测试:
- private void Form1_Load(object sender, EventArgs e)
- {
- FarPoint.Win.Spread.CellType.CheckBoxCellType ckbxcell = new FarPoint.Win.Spread.CellType.CheckBoxCellType();
- ckbxcell.TextAlign = FarPoint.Win.ButtonTextAlign.TextRightPictLeft;
- ckbxcell.Caption = "Item Selected?";
- fpSpread1.Sheets[0].Cells[0, 0].CellType = ckbxcell;
- FarPoint.Win.Spread.Cell acell;
- acell = fpSpread1.Sheets[0].Cells[0, 0];
- fpSpread1.Sheets[0].Cells[0, 0].Text = "Note Test";
- acell.Note = "This is a note";
- fpSpread1.Sheets[0].Cells[0, 0, 3, 3].NoteStyle = FarPoint.Win.Spread.NoteStyle.PopupNote;
- this.fpSpread1.AllowDrop = true;
- FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo nsinfo = new FarPoint.Win.Spread.DrawingSpace.StickyNoteStyleInfo();
- nsinfo = fpSpread1.Sheets[0].GetStickyNoteStyleInfo(0, 0);
- nsinfo.BackColor = Color.Bisque;
- nsinfo.Font = new Font("Tahoma", 24);
- nsinfo.ForeColor = Color.Cyan;
- nsinfo.Width = 320;
- nsinfo.ShapeOutlineColor = Color.Cyan;
- nsinfo.ShapeOutlineThickness = 1;
- nsinfo.ShadowOffsetX = 3;
- nsinfo.ShadowOffsetY = 3;
- fpSpread1.Sheets[0].SetStickyNoteStyleInfo(0, 0, nsinfo);
- }
复制代码 |