JavaScript Editor JavaScript Editor     JavaScript Debugger

Previous Section Next Section

Main Page

Splitters

You can use splitters to let the user resize controls. Here's how it works: you add a control to a form, then dock it. Next, you add a splitter and dock it to the same side of the same container, which places the control just before the splitter in the docking order. When you run the program, the splitter is invisible until the mouse passes over it, when the splitter changes the mouse cursor, indicating that the control can be resized, as you see in Figure 8.2, which is the Splitters example on the CD-ROM. In that figure, I'm moving the splitter, and when I release it, the control I'm resizing (a text box in this case) is indeed resized to match.


Figure 8.2: A splitter in action.

That's about all there is to this control, but it can be a useful one, because space is always at a premium in Windows programs, and splitter controls let you resize controls, extending them as needed, or tucking them away when their job is over.

Previous Section Next Section




JavaScript Editor Free JavaScript Editor     JavaScript Editor