Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sizeable Docking

64 views
Skip to first unread message

Henry Bragg

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to
I want to dock a form to the left side of my main form, and give the user of
grabbing the docked panel and sizing it. However, the only objects in Delphi
that can have sizeable borders are descendants of TCustomForm. Does anyone
know of a component that can be placed on a form but still have sizeable
borders, or have any other solutions to this problem?

Thanks,

Henry Bragg

Eddie Shipman

unread,
Jun 7, 1999, 3:00:00 AM6/7/99
to
You will have to handle the placement and movement of the borders yourself.

Look into WM_NCHITTEST message and Use Setbounds for the placement of your
"dockable" form.

If you are using D4, check out the SizeConstraints and Anchor properties of
TControl.

Henry Bragg <hbr...@khsys.com> wrote in message
news:7jgn3o$1f...@forums.borland.com...

Jenny Ridler

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
You could use a splitter between the docking panel and the rest of the form
(after docking you have to make sure the splitter ends up on the right hand side
of the docked panel ). Make sure the panel you dock to does not have its
autosize property to true once you have docked otherwise the splitter cannot do
anything! I set the panel's autosize to true after undocking so it disappears
afterwards and only appears after you dock (use the dockrect too).

I hope this is useful

Jenny

Eddie Shipman

unread,
Jun 8, 1999, 3:00:00 AM6/8/99
to
Take a look at this link:
http://www.undu.com/Articles/990413b.html

Henry Bragg <hbr...@khsys.com> wrote in message
news:7jgn3o$1f...@forums.borland.com...

Henry Bragg

unread,
Jun 29, 1999, 3:00:00 AM6/29/99
to
This works for a panel that is docked to the left of the form, the top, or
the bottom. However, it does not work for a panel that is docked to the
right of the form. It is behaving as if I had the panel's autosize set to
true, but I have explicitly turned that off.

Henry
Jenny Ridler wrote in message <375D3EB6...@techprt.co.uk>...


>You could use a splitter between the docking panel and the rest of the form
>(after docking you have to make sure the splitter ends up on the right hand
side
>of the docked panel ). Make sure the panel you dock to does not have its
>autosize property to true once you have docked otherwise the splitter
cannot do
>anything! I set the panel's autosize to true after undocking so it
disappears
>afterwards and only appears after you dock (use the dockrect too).
>
>I hope this is useful
>
>Jenny
>
>Henry Bragg wrote:
>

Ray Konopka

unread,
Jun 30, 1999, 3:00:00 AM6/30/99
to
Hi Henry,

>I want to dock a form to the left side of my main form, and give the user of
>grabbing the docked panel and sizing it. However, the only objects in Delphi
>that can have sizeable borders are descendants of TCustomForm. Does anyone
>know of a component that can be placed on a form but still have sizeable
>borders, or have any other solutions to this problem?


You can use the TRzSizePanel that comes in Raize Components II.
It can serve as a DockSite and can be placed at any side of a
form. The opposite site can be dragged like a splitter bar, but
it is built into the component. For more information about
Raize Components, please see our web site at
http://www.raize.com/RzComps/index.htm.

Ray

____________________________________________________________
Ray Konopka
Raize Software Solutions, Inc.
http://www.raize.com


Ola Vea Gustavsen

unread,
Jun 30, 1999, 3:00:00 AM6/30/99
to
You should play around a little with the docking example in the
Demos\Docking directory of D4. It uses splitters and move them manually each
time a panel becomes visible/hidden. All respect to Raize components, but it
seems a little wasted to buy them just to get the splitter functionality.

Greetings
Dag Sverre, dags...@yahoo.com
Nynodata AS, Norway

Ray Konopka

unread,
Jun 30, 1999, 3:00:00 AM6/30/99
to
Hi,

>You should play around a little with the docking example in the
>Demos\Docking directory of D4. It uses splitters and move them manually each
>time a panel becomes visible/hidden.

Yes, you can use the approach from the Docking demo. However,
everything has to be accomplished by writing code, which does
not lend itself to a reusable solution.

>All respect to Raize components, but it
>seems a little wasted to buy them just to get the splitter functionality.


I certainly agree. It makes little sense to purchase a component
library with 82 components in it just for one component. However,
it has happened <g>.

0 new messages