PC Review Forums Newsgroups Microsoft DotNet Microsoft Dot NET Framework Forms Reset option on additional Image based property

Reply

Reset option on additional Image based property

 
Thread Tools Rate Thread
Old 14-12-2005, 08:33 PM   #1
JezB
Guest
 
Posts: n/a
Default Reset option on additional Image based property


I've extended (subclassed) a Button control and given it two new Image
properties (for mouse over and mouse click images). These work fine but I've
noticed that once I set one of my two new Images in forms designer, I cannot
clear it since the Reset option is disabled on the right-click menu in the
property editor. How can I ensure this option is enabled?

NB. Sorry for the cross-post, posted to wrong group.


  Reply With Quote
Old 17-12-2005, 02:19 PM   #2
Bob Powell [MVP]
Guest
 
Posts: n/a
Default Re: Reset option on additional Image based property

Use the DefaultValue attribute with a null setting on the property.

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

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

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

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.





"JezB" <jezbroadsword@blueyonder.co.uk> wrote in message
news:Obho71OAGHA.3584@TK2MSFTNGP14.phx.gbl...
> I've extended (subclassed) a Button control and given it two new Image
> properties (for mouse over and mouse click images). These work fine but
> I've
> noticed that once I set one of my two new Images in forms designer, I
> cannot
> clear it since the Reset option is disabled on the right-click menu in the
> property editor. How can I ensure this option is enabled?
>
> NB. Sorry for the cross-post, posted to wrong group.
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off