Board index » cppbuilder » Resizing dock host form doesn't resize docked form
|
Michael Skelton
CBuilder Developer |
Resizing dock host form doesn't resize docked form2006-02-09 11:14:21 PM cppbuilder107 Greetings, I have implemented my own custom dock manager to satisfy specialized requirements for the desired docking behavior, and I have to say, it works rather well. I was able to replace the grabber bars with a Windows-style caption bar, as well as some other small details. There is one issue, however, that I have thus far been unable to solve. I have a host form that contains four dock site panels, placed at the top, bottom, right and left edges of the form. Each panel is aligned according to its position (i.e. top panel is alTop, bottom panel is alBottom, etc.). After the dockable form is attached to a host panel site, I am able to size the docked form using a splitter, and this works fine. Moreover, if I attempt to resize the outer host form in THE SAME DIRECTION as the alignment of the dock site panel, everything is good. The problem arises when I size the outer host panel in an ORIENTATION DIFFERENT than the alignment of the dock site panel. For example, say I dock the attachable form to the right-side panel; it's aligned alRight. I can then size the docked form horizontally using a splitter. I can also size the outer host form horizontally. When I attempt to size the outer host form VERTICALLY, then the right-docked form doesn't properly adjust itself to match the new vertical size of the outer host form. The docked form's client area doesn't stretch to match the larger client area of the outer host form, leaving an ugly gap. Does anyone now of a way I can adjust my custom dock manager to adapt to changes in the outer host form's size? I've tried several different approaches, like overriding the ResetBounds() method, and even adding special code in the PaintDockFrame() method, which I'm already overriding. Nothing seems to work. Any help would be greatly appreciated to solve this annoying glitch. Thanks, -Michael |
