nHydrate.DslPackage.Forms.DBObjectDifferenceForm.txtText2_Scroll C# (CSharp) Method

txtText2_Scroll() private method

private txtText2_Scroll ( object sender, ScrollEventArgs e ) : void
sender object
e ScrollEventArgs
return void
		private void txtText2_Scroll(object sender, ScrollEventArgs e)
		{
			_isScrolling = true;
			try
			{
				if (txtText2.VerticalScroll.Value <= txtText1.VerticalScroll.Maximum)
					txtText1.VerticalScroll.Value = txtText2.VerticalScroll.Value;
				else
					txtText1.VerticalScroll.Value = txtText1.VerticalScroll.Maximum;

				if (txtText2.HorizontalScroll.Value <= txtText1.HorizontalScroll.Maximum)
					txtText1.HorizontalScroll.Value = txtText2.HorizontalScroll.Value;
				else
					txtText1.HorizontalScroll.Value = txtText1.HorizontalScroll.Maximum;

				txtText1.Refresh();
			}
			catch (Exception ex)
			{
				throw;
			}
			finally
			{
				_isScrolling = false;
			}

		}