示例#1
0
 /// <summary>
 /// Sets the automatic scroll.
 /// </summary>
 /// <param name="control">The control.</param>
 /// <param name="value">if set to <c>true</c> [value].</param>
 public static void SetAutoScroll(this ToolStrip control, bool value)
 {
     if (control.InvokeRequired)
     {
         control.BeginInvoke(new MethodInvoker(() => control.SetAutoScroll(value)));
     }
     else
     {
         control.AutoScroll = value;
         control.Refresh();
     }
 }