Board index » cppbuilder » Resizing dock host form doesn't resize docked form

Resizing dock host form doesn't resize docked form


2006-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
 
 

Re:Resizing dock host form doesn't resize docked form

I initially asked this question in cppbuilder.vcl.components.using, but I
think it has more relevance in this group.
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
 

Re:Resizing dock host form doesn't resize docked form

Duoh!!
FYI, This problem was not related to the custom dock manager's
functionality. It was a result of setting the docking form's max
height/width properties at run-time. Resizing the host form such that the
docked form would stretch beyond it's maximum dimensions caused the ugly
client area gap that I referred to.
"Michael Skelton" < XXXX@XXXXX.COM >wrote in message
Quote
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

 

{smallsort}

Re:Resizing dock host form doesn't resize docked form

Duoh!!
FYI, This problem was not related to the custom dock manager's
functionality. It was a result of setting the docking form's max
height/width properties at run-time. Resizing the host form such that the
docked form would stretch beyond it's maximum dimensions caused the ugly
client area gap that I referred to.
"Michael Skelton" < XXXX@XXXXX.COM >wrote in message
Quote
I initially asked this question in cppbuilder.vcl.components.using, but I
think it has more relevance in this group.

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