Tutorial :How to set “Align left” to have predominance over “Align Top” in Delphi 7?


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 http://www.freeimagehosting.net/uploads/2ede3a0023.jpg


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


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.

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »