Splitter

Typically, complex controls that include treeview and/or list controls make use of a splitter control to separate the "panes" of the container. The splitter control is an unobtrusive, almost invisible control that allows the end user to resize other controls. It generally appears as a thin gray horizontal or vertical bar separating other resizable controls, such as panels, group boxes, ListViews, and tree views. When the mouse cursor hovers over the splitter, the cursor changes to either the Cursors.VSplit (

image with no caption

) or Cursors.HSplit (

image with no caption

) cursor to indicate that the adjacent control(s) can be resized. The user can then click and drag the splitter to resize the adjacent controls. There is no way to access a splitter from the keyboard.

Figure 14-2 shows a screenshot of Microsoft Outlook Express, an application that uses two splitters. The vertical splitter separates the tree view on the left from the two controls on the right, and the horizontal splitter separates the ListView and the text box on the right side. Either of the splitters can be moved by the user, changing the relative sizes of all three controls accordingly.

Splitter controls used in Outlook Express

Figure 14-3. Splitter controls used in Outlook Express

The Splitter ...

Get Programming .NET Windows Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.