By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 992 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Limiting ClientRectangle in UserControls

P: n/a
I have a UserControl which draws using GDI+ on the top 40
pixels or so. Everything below that is available for
users to place other controls on (like buttons, etc.)
What I need to be able to do is lower the ClientRectangle
so that other controls can't draw above the 40 pixel
line. Basically, I want to make x=0, y=40 on the
UserControl look like x=0, y=0 to the client control.

Limiting the DisplayRectangle doesn't work, because the
designer still allows controls to be placed over the top
40 pixels.

Thanks!
Brian

Nov 15 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Just allow them to place their controls in a panel object in the lower
portion of the window.

--
Bob Powell [MVP]
C#, System.Drawing

September's edition of Well Formed is now available.
http://www.bobpowell.net/currentissue.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/gdiplus_faq.htm

Blog http://bobpowelldotnet.blogspot.com

"Brian Adams" <Br*********@KindredHealthcare.com> wrote in message
news:0c****************************@phx.gbl...
I have a UserControl which draws using GDI+ on the top 40
pixels or so. Everything below that is available for
users to place other controls on (like buttons, etc.)
What I need to be able to do is lower the ClientRectangle
so that other controls can't draw above the 40 pixel
line. Basically, I want to make x=0, y=40 on the
UserControl look like x=0, y=0 to the client control.

Limiting the DisplayRectangle doesn't work, because the
designer still allows controls to be placed over the top
40 pixels.

Thanks!
Brian

Nov 15 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.