Beispiel #1
0
			/// <summary>
			/// Offset cell bounds, check box bounds, image bounds and text bounds by specified offset.
			/// </summary>
			/// <param name="cell">Cell to offset.</param>
			/// <param name="x">Horizontal offset in pixels.</param>
			/// <param name="y">Vertical offset in pixels.</param>
			public void Offset(Cell cell, int x, int y)
			{
				cell.SetBounds(new Rectangle(cell.BoundsRelative.X+x,cell.BoundsRelative.Y+y,cell.BoundsRelative.Width,cell.BoundsRelative.Height));
				if(!cell.CheckBoxBoundsRelative.IsEmpty)
					cell.SetCheckBoxBounds(new Rectangle(cell.CheckBoxBoundsRelative.X+x,cell.CheckBoxBoundsRelative.Y+y,cell.CheckBoxBoundsRelative.Width,cell.CheckBoxBoundsRelative.Height));
				if(!cell.ImageBoundsRelative.IsEmpty)
					cell.SetImageBounds(new Rectangle(cell.ImageBoundsRelative.X+x,cell.ImageBoundsRelative.Y+y,cell.ImageBoundsRelative.Width,cell.ImageBoundsRelative.Height));
				if(!cell.TextContentBounds.IsEmpty)
					cell.TextContentBounds=new Rectangle(cell.TextContentBounds.X+x,cell.TextContentBounds.Y+y,cell.TextContentBounds.Width,cell.TextContentBounds.Height);
			}