Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 946
Hardy Le Roux Avatar asked Jul 07 '10 09:07

Hardy Le Roux


2 Answers

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.

like image 87
James Barrass Avatar answered Sep 27 '22 18:09

James Barrass


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

like image 34
Uli Gerhardt Avatar answered Sep 27 '22 17:09

Uli Gerhardt