Many practitioners Delphi-programmers know that the standard TSplitter'a have a number of drawbacks (ie bugs, if you say openly). In an effort to combat the errors of standard TSplitter'a, as well as wanting to "tie" to the splitter button (to hide / display the associated panel), I once tried many component (available for free download), but on anything not specifically I stopped: all options were not something that had to be me. As a result, I decided to write a component.
The basis of the component I took a normal TSplitter (copy / paste). The first thing I did - he changed the parent class (TGraphicControl replaced the TCustomControl), which made normal processing keyboard (Escape-key) and mouse (without hacks and sub-processors have active control). Secondly introduced the concept AlignControl - associated with the splitter component (at TSplitter this component is determined at run-time, and it sometimes leads to the fact that the splitter loses bind to a component). Then I added the (drawing algorithm which I borrowed from another splitter, unfortunately I do not remember what it was). Oh, and lastly, the component has got the ability to communicate with Action'ami.
So, I suggest you a VCL component: TdnSplitter. This is another clone of the splitter, but he has distinctive features. The most important - TdnSplitter not the heir of TSplitter. And therefore it does not inherit the problems TSplitter'a. TdnSplitter created as a separate component.
Here is a list of distinctive properties of the component.
TdnSplitter inherited from TCustomControl (who in turn inherited from TWinControl), unlike TSplitter, who inherited TGraphicControl.
Property AlignControl. This property is specified explicitly (or automatically determined Design-Time). Because of this accidental loss associated with splitter components is impossible in principle.
Property IsSnapped. To find out whether the hidden component can be associated Boolean-through property. Through the same property you can hide / display the associated components.
Property ControlSize. This feature allows you to check (or change) the width of the associated component (or height - depending on the location).
There is a button for hiding / displaying the associated component. For this button, you can specify the Hint and several other parameters responsible for the appearance.
The property allows you to restrict AllowDrag resized by dragging the associated component (ie it is possible to leave only the button and the splitter will have only two positions - see. Property IsSnapped).
Property Action. TdnSplitter can be linked to Action. If you are using Action'ami, then you will understand why this is necessary.
Due to the properties and IsSnapped ControlSize save and restore the state of the splitter and the associated component it has become easier than ever.