C# Make a SplitContainer dragbar visible to users

/// Given a SplitContainer,
/// set the color of its background to make the splitter dragbar visible to users.
/// Set the color of the splitter’s panels to the original color of the splitter,
/// to keep their backcolors consistent with the application.
public static void ConfigureSplitterForVisibility(System.Windows.Forms.SplitContainer sc)
System.Drawing.Color DEFAULT_SPLITTER_BACKCOLOR = System.Drawing.Color.LightSteelBlue;
System.Drawing.Color oldDefaultColor = sc.BackColor;
sc.Panel1.BackColor = oldDefaultColor;
sc.Panel2.BackColor = oldDefaultColor;

This entry was posted in C#, Programming. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *