public AnimationCellDemo() { InitializeComponent(); // prepare timer to udpate sheet timer.Interval = 10; timer.Tick += timer_Tick; // get default worksheet worksheet = grid.CurrentWorksheet; // change cells size worksheet.SetRowsHeight(5, 1, 100); worksheet.SetColumnsWidth(1, 5, 100); worksheet.SetRangeStyles(3, 1, 5, 5, new WorksheetRangeStyle { Flag = PlainStyleFlag.HorizontalAlign | PlainStyleFlag.VerticalAlign, HAlign = ReoGridHorAlign.Center, VAlign = ReoGridVerAlign.Middle, }); // waiting cell loadingCell = new LoadingCell(); worksheet[3, 1] = loadingCell; // gif image cell gifCell = new GifImageCell(Resources.loading); worksheet[5, 2] = gifCell; // gif image cell worksheet[5, 4] = new BlinkCell(); worksheet[5, 4] = "Blink Cell"; // note text worksheet[7, 1] = "NOTE: Too many updates for animation might affect the rendering performance."; worksheet.SetRangeStyles(7, 1, 1, 1, new WorksheetRangeStyle { Flag = PlainStyleFlag.TextColor | PlainStyleFlag.BackColor, BackColor = SolidColor.Orange, TextColor = SolidColor.White, }); worksheet.MergeRange(7, 1, 1, 6); }
public AnimationCellForm() { InitializeComponent(); // prepare timer to udpate sheet timer.Interval = 10; timer.Tick += timer_Tick; // change cells size grid.SetColsWidth(1, 5, 100); grid.SetRowsHeight(5, 1, 100); grid.SetRangeStyle(3, 1, 3, 5, new ReoGridRangeStyle { Flag = PlainStyleFlag.HorizontalAlign, HAlign = ReoGridHorAlign.Center, }); // waiting cell loadingCell = new LoadingCell(); grid[3, 1] = loadingCell; // gif image cell gifCell = new GifImageCell(Resources.loading); grid[5, 2] = gifCell; // gif image cell grid[5, 4] = new BlinkCell(); grid[5, 4] = "Blink Cell"; // note text grid[7, 1] = "NOTE: Too many updates during animation will affect the rendering performance."; grid.SetRangeStyle(7, 1, 1, 1, new ReoGridRangeStyle { Flag = PlainStyleFlag.TextColor | PlainStyleFlag.FillColor, BackColor = Color.Orange, TextColor = Color.White, }); grid.MergeRange(7, 1, 1, 6); }