Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / July 2006

Tip: Looking for answers? Try searching our database.

control in user control to adjust with size

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David C - 09 Jul 2006 10:23 GMT
I have a datagrid control encapsulated inside a user control.  When I use
the user control on a form and change its size, is there a way to get the
datagrid inside the user control to adjust with it accordingly?

Thanks.
Kevin Spencer - 09 Jul 2006 12:32 GMT
There are about a half-dozen ways. You can use the Anchor property to attach
the Control to one or more sides of its container, which causes that side to
remain at the same distance from the edge of the container when the
container changes size. You can use Docking to dock the child control to the
top, bottom, left, or right side, and that behavior is different than the
Anchor behavior. You can put the Control into a Container Control such as a
SplitPanel, Panel, etc., and use its relationship to the Container combined
with the Container's relationship to its Container. You can handle resizing
events and assign values to the Location and/or Size of the Control.

Signature

HTH,

Kevin Spencer
Microsoft MVP
Professional Chicken Salad Alchemist

Big thicks are made up of lots of little thins.

>I have a datagrid control encapsulated inside a user control.  When I use
>the user control on a form and change its size, is there a way to get the
>datagrid inside the user control to adjust with it accordingly?
>
> Thanks.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.