Board index » delphi » align alclient but with a little border

align alclient but with a little border

I want to place a memo component in my form, I have used the alclient
align mode, but I want to leave a little border (2 pixels) between the
form and the memo, is that possible (I am working with Delphi 1.0)

Thanks in advance
Enrique Mengibar from the sunny Spain
PD: Sorry for my English

 

Re:align alclient but with a little border


To allow a border around your memo component just place a panel
component on the form first. Set its alignment to alClient. Place the
memo on the panel. Set the memo's alignment to alclient.  Set the border
to what you want using Border, borderthickness, bevelinner, bevelouter
properties.  If your Delphi is as good as your English, you have no
problems.

Regards,

Jeff Hutton

Quote
Enrique Mengibar wrote:

> I want to place a memo component in my form, I have used the alclient
> align mode, but I want to leave a little border (2 pixels) between the
> form and the memo, is that possible (I am working with Delphi 1.0)

> Thanks in advance
> Enrique Mengibar from the sunny Spain
> PD: Sorry for my English

Re:align alclient but with a little border


Quote
Enrique Mengibar wrote:

> I want to place a memo component in my form, I have used the alclient
> align mode, but I want to leave a little border (2 pixels) between the
> form and the memo, is that possible (I am working with Delphi 1.0)

Sure. Create a TopPnl that's two pixels high, aligned alTop. Create a
BottomPnl that's two pixels high, aligned alBottom. Create a LeftPnl
that's two pixels wide, aligned alLeft. Create a RightPnl that's two
pixels wide, aligned alRight. Then add your alClient aligned TMemo.

--

http://www.midnightbeach.com/jon   Personal Pages
http://www.midnightbeach.com/jon/pubs Programming Publications
http://www.midnightbeach.com/hs             Home School Resource List

Re:align alclient but with a little border


Quote
Enrique Mengibar wrote:

> I want to place a memo component in my form, I have used the alclient
> align mode, but I want to leave a little border (2 pixels) between the
> form and the memo, is that possible (I am working with Delphi 1.0)

> Thanks in advance
> Enrique Mengibar from the sunny Spain
> PD: Sorry for my English

One way to do this is with a TPanel component.
Drop the panel onto your form, and set it to alclient.
Now, you can use the panel's Borderwidth property to leave a border
around any aligned components you put on the panel.

Stefano Busti

Other Threads