Jump to content
  • Advertisement
Sign in to follow this  
pim

[.net] Drawing outside a control at design time

This topic is 4968 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi! Is it possible to draw outside a control at design time, for instance using a DesignerAttribute? The panel class seems to be doing this (in widbey)...

Share this post


Link to post
Share on other sites
Advertisement
The simple answer is, "Yes."

The correct answer depends on your intent.

Are you merely trying to draw beyond your boundaries, but remain on the form?

Are you planning on skinning other controls?

Are you wanting to implement additional design-time features? If so, why can't they be done via the Properties dialog?

Share this post


Link to post
Share on other sites
I would like some design time "candy"... what I would like to do is to have some X'es to remove rows and columns in a grid control. It's not important that they're partially outside the control, but I've seen it's been done, so I would like to see how ;)

Share this post


Link to post
Share on other sites
Well, you may be in trouble.

In VS.NET, you can draw outside the bounds of your control if you ask for create a Graphics object off of the control's parent. Of course, you'll have to remember to shift your graphics calls manually and Invalidate the form when you lose focus.

However, I don't know of a way in VS.NET 2002/2003 to capture mouse input outside of your control at design time. You may just end up creating small tool windows in the appropriate places on the screen...

Share this post


Link to post
Share on other sites
hmmmm... ok... It's not that important anyway.. it's just that having design time controls not cluttering up the control might make it easier to edit..

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!