/// <summary> /// Method to paint the wave /// </summary> /// <param name="e"></param> protected override void OnPaint(PaintEventArgs e) { base.OnPaint(e); scrollBar.Invalidate(); scrollBar.Refresh(); drawHeight = Height - scrollBar.ClientRectangle.Height; Graphics g = e.Graphics; drawSelection(g); drawGrid(g); drawWave(g); }