TGrabBar v1.11 Description: A bar that allows two TWinControl components to be resized by dragging it. Contact Information: Feel free to contact me if you have any questions, comments or suggestions at bstowers@pobox.com. The lateset version will always be available on the web at: http://www.pobox.com/~bstowers/delphi/ Known Issues: * Because of the DCX_PARENTCLIP in GetDCEx, moving bar over controls that are not involved in the moving process will get a bar drawn on them. But, in practice, the bar should never be in a position to move over windows that it is not connected with. Without this, couldn't see bar over controls created after it. * Does not get along with siblings who are alClient aligned. Use a TPanel as parent of bar and siblings and align the panel as alClient. * Needs a keyboard interface. Revision History: 1.11: + Added GBarReg unit. All IDE specific code (i.e. registering the component, property editors, etc.) are contained in this unit. This was done for two primary reasons: 1) Using the component in a Delphi or C++Builder expert would register the component as well. 2) Reduce code size in some cases -- usually the smart linker removes this sort of stuff since the app never references it, but now it's for certain since it isn't even in the unit. This change means that you need to install the component using the new "registration" unit instead of the unit containing the component. 1.10: + SetBounds method was inadvertently redeclared in the protected section. It should have been, and now is, in the public section. 1.09: + If parent of the bar was a panel, it's BorderWidth was not honored. This was fixed by Rob Leland , many thanks to him. 1.08: + Added Version property. 1.07: + Updated for new DFS.INC file, component tab name, history/comments file. 1.06: + Optimized painting. Removed Paint method entirely, BorderStyle is now drawn by Windows itself via WS_BORDER style flag (geez, I can be dense) and Ctl3D painting is done in WM_ERASEBKGND message handler where it is MUCH faster. This was really bad when MS Plus! was installed and windows were redrawn as they were resized. + Resizing the parent window will now honor the WindowBMinSize property as best it can. Trying honor both WindowAMinSize and WindowBMinSize is going to be a mess (have to handle WM_GETMINMAXINFO) and I'm just too lazy to get into it right now. 1.05: + Fixed small painting problem when maximizing or restoring window. + WindowAMinSize and WindowBMinSize properties added to allow limiting of the size a window can be shrunk to. Most code provided by Beth Weiss (bweiss@wpgate1.wpafb.af.mil). 1.04: + Fixed problem that could allow bar to be moved under controls that were not being separated by the bar. This would hide the bar from the user. + Fixed bug that would, under certain conditions, cause the bar to have an incorrect thickness. + Fixed bug that would allow you to select the same window for both WindowA and WindowB properties. Caused nasty crash when the control is removed. + Added DragUpdate property that resizes the split windows as you drag the grab bar. 1.03: + Resource for 16 and 32-bit version. This takes the place of a DCR file, which can't be compatible with both. See the $R directive below. To compile the resource file, use the following Delphi 1: BRCC.EXE -foGrabBar.r16 -31 GrabBar.rc Delphi 2: BRCC32.EXE -foGrabBar.r32 -w32 GrabBar.rc 1.02: + Automatically adjusts windows it owns to proper alignment in this way: Alignment of alNone is not adjusted. alClient is changed to alLeft/alRight or alTop/alBottom based on current divider style. alLeft/alRight and alTop/alBottom are validated, i.e. if WindowA property is aligned alRight, it is changed to be alLeft, or if WindowB was alLeft in gbHorizonal bar, it would be changed to alTop. + Changing the style now will now move the control to the center of parent window. Before it would be something silly like flush top or left. 1.01: + Stupid last minute optimization broke the thing. Fixed. 1.00: + Initial release