DSShared.Lists.CustomListColumnCollection.colLeftChanged C# (CSharp) Method

colLeftChanged() private method

private colLeftChanged ( CustomListColumn col, int amount ) : void
col CustomListColumn
amount int
return void
		private void colLeftChanged(CustomListColumn col,int amount)
		{
			if(!leftChangeLock)
			{
				if(col.Index==0)
					return;

				if(this[col.Index-1].Width-amount>=CustomListColumn.MinWidth)
				{
					leftChangeLock=true;
					this[col.Index-1].Width-=amount;

					int startX=this[col.Index-1].Width+this[col.Index-1].Left;
					for(int i=col.Index;i<Count;i++)
					{
						this[i].Left=startX;
						startX+=this[i].Width;
					}

					if(RefreshEvent!=null)
						RefreshEvent();

					leftChangeLock=false;
				}
			}
		}