I change Position too by percent of TPS height. Percent of Position of height I change in TPS-Side1.OnResize. But percent of height is changed when I change the main application window size (MAWS).
How can I will create this code?
- change MAWS changes all TPS proportional with Position
I think (not tested...) this is possible by simulating some kind of OnMoved event for the PairSplitter based on its OnMouseDown/Move/Up events, and leave the sides' OnResize alone. The splitter's OnResize, then, should reposition the splitter according to its relative position within the form. I guess it's not difficult but will require some code...
Alternatively you could use a standard TSplitter with two panels above and below the splitter. Set the splitter's Align to alNone so that it is floating. Use the anchor editor to attach the upper panel to the top, left and right sides of the form; its bottom side should be attached to the top side of the splitter. The lower panel should be attached to the left, bottom and right sides of the form, and the upper edge should be attached to the lower side of the splitter. The splitter should be anchored to the left and right sides of the form, but -- and this is important -- it must be floating vertically, i.e. the anchor editor must not show checks for "top anchoring" and "bottom anchoring". In this configuration, the splitter will move when the size of the form changes, and its speed of movement depends on the relative position of the splitter inside the form.
Have a look at the attached sample.