WinX Splitters


WinX Splitter controls work with the Auto Sizer. They are used to allow the user to modify the size of a control (or embedded series). To create a splitter control, simply add the $$SIZER_SPLITTER flag when you register the Auto Sizer info for the control you want to attach the splitter to. The control the splitter attaches to must have an absolute size (> 1), not a relative size (<=1) .

Splitter controls are often used to implement resizeable panels attached to the sides of a window. To implement this with WinX Splitter controls you want to first create two Auto Sizer series, one for the left panel and the other for the right panel. Add the left panel to the series with the $$SIZER_SPLITTER flag and an absolute size. Add the right panel with the $$SIZER_RELREST flag and a size of 1. When the user drags the splitter the left panel will change size and the right panel will adjust to fill the remaining space. When the window is resized the width of the left panel is unchanged, the right panel grows and shrinks to compensate.

This technique places the panel on the left. To place the panel on the right instead the simplest option is to use the $$SIZER_REVERSE flag. This process the series from right to left instead of left to right. Of course, you can also place the panel on the top or bottom of the window by using vertical series instead of horizontal series

Related Links

Auto Sizer
WinXNewAutoSizerSeries
WinXAutoSizer_SetSimpleInfo