ARCed.Scripting.ScriptEditorForm.Scintilla_TextChanged C# (CSharp) Method

Scintilla_TextChanged() private method

Ensures the margin is sized correctly to allow display of the line numbers
private Scintilla_TextChanged ( object sender, EventArgs e ) : void
sender object
e EventArgs
return void
		private void Scintilla_TextChanged(object sender, EventArgs e)
		{
			int lineNumber = this._scintilla.Lines.Count;
			if (lineNumber < 100)
				this._scintilla.Margins.Margin0.Width = 20;
			else if (lineNumber < 1000)
				this._scintilla.Margins.Margin0.Width = 30;
			else if (lineNumber < 10000)
				this._scintilla.Margins.Margin0.Width = 40;
			else if (lineNumber < 100000)
				this._scintilla.Margins.Margin0.Width = 50;
			else
				this._scintilla.Margins.Margin0.Width = 60;
			this.UpdateTitle();
			this.UpdateScriptStatus();
		}