views:

76

answers:

2

I want to align a certain component to Align=alLeft on the panel, occupying the whole left side of the panel. Then also have another component set to Align=AlTop, but not having predominance over the component aligned to the left, so that it will only occupy the top of the panel where the component that is aligned left is not occupying. (if that makes any sense). The thing is, I am doing a lot of custom drawing on the panel, so i am not able to add extra panels on top of my original panel to sub divide the panel and accomplish the alignment as I would normally do. So I want to change how Align works for this specific panel. Is that at all possible? I am using Delphi 7. Something like this:

alt text

+4  A: 

Well if you can't add an extra panel with alClient underneath the panel with alTop,

then my alternative would be to use anchors, just placing the panels where you want them and adding akBottom to the left panel and akRight to the top panel.

The final option is to resize the panels yourself in the OnResize event of the form/parent container.

JamesB
+1  A: 

Have a look at alCustom. I don't see it used much nowadays but Demo2 from here might be what you need.

Ulrich Gerhardt
Thank you Ulrich. This was exactly what I was looking for. I never knew how to use alCustom, this example showed me how.
Delphiguy