private void Update(int Row, int Column) { int RowViewportIndex = FpSpread.GetActiveRowViewportIndex(); int ColumnViewportIndex = FpSpread.GetActiveColumnViewportIndex(); Rectangle rect = FpSpread.GetCellRectangle(RowViewportIndex, ColumnViewportIndex, Row, Column); FpSpread.Invalidate(rect); }
protected override void OnLoad(EventArgs e) { //== Get list of all controls. List <Control> listControls = new List <Control>(); for (int i = 0; i < this.Controls.Count; i++) { GetAllControls(this.Controls[i], listControls); } // Invalidate appearance for all controls which supported. for (int i = 0; i < listControls.Count; i++) { if (listControls[i] as IAppearanceUpdatable != null) { ((IAppearanceUpdatable)listControls[i]).InvalidateAppearance(); } if (listControls[i] as FpSpread != null) { FpSpread fp = (FpSpread)listControls[i]; Appearance appearance = null; if (fp.TextTipDelay == 1000) { appearance = AppearanceManager.DefaultAppearanceSet["ListDataGridStyle"]; } else { appearance = AppearanceManager.DefaultAppearanceSet[""]; } if (appearance != null) { System.Drawing.Font f = new System.Drawing.Font(appearance.FontName, appearance.FontSize, appearance.FontStyle); fp.Font = f; fp.BackColor = appearance.BackColor; fp.ForeColor = appearance.ForeColor; fp.Invalidate(false); //FontStyle fontStyle = appearance.FontStyle; //Font font = new Font(appearance.FontName, appearance.FontSize, fontStyle); //this.Font = font; //this.BackColor = appearance.BackColor; //this.ForeColor = appearance.ForeColor; //this.Invalidate(false); } } } base.OnLoad(e); }