Home All Groups Group Topic Archive Search About

Making richtextbox resize with form?

Author
12 Apr 2005 2:19 PM
Brett
How do I have a richtextbox (or similar item) width resize when I increase
the parent form width?

I could probably use the form change event and have the richtextbox set
to -10 of the form width but was wondering if there is a better way.

Thanks,
Brett

Author
12 Apr 2005 2:29 PM
Herfried K. Wagner [MVP]
"Brett" <no@spam.com> schrieb:
> How do I have a richtextbox (or similar item) width resize when I increase
> the parent form width?
>
> I could probably use the form change event and have the richtextbox set
> to -10 of the form width but was wondering if there is a better way.

Set the richtextbox's 'Dock' property to 'Fill' or anchor the form on each
of the four edges.

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>
Author
12 Apr 2005 2:42 PM
Brett
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:Ok0LGw2PFHA.3668@TK2MSFTNGP14.phx.gbl...
> "Brett" <no@spam.com> schrieb:
>> How do I have a richtextbox (or similar item) width resize when I
>> increase the parent form width?
>>
>> I could probably use the form change event and have the richtextbox set
>> to -10 of the form width but was wondering if there is a better way.
>
> Set the richtextbox's 'Dock' property to 'Fill' or anchor the form on each
> of the four edges.

Nice.  Thanks.