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 / March 2008

Tip: Looking for answers? Try searching our database.

const Image to set DefaultValue on Image property

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
CBanu [IXIA] - 26 Mar 2008 13:42 GMT
Hi all,

I'm having some problems with one of my controls. I derived a control
(MyImageButton) only to set a specific Image on it
(MyToolTipInfoButton) when calling the constructor. However, the
designer doesn't know about this change, because on the Image property
the DefaultValueAttribute is still null. When trying to override it, I
see that I can only use const values when creating the attribute.

The question is: how do I create a const Image? I know how to do
static, but const is a mistery.

I hope someone has a solution for this.

Thanks in advance,
Cosmin
CBanu [IXIA] - 26 Mar 2008 15:46 GMT
After searching a little more, I found the following article "Defining
Default Values with the ShouldSerialize and Reset Methods":

http://msdn2.microsoft.com/en-us/library/53b8022e(VS.80).aspx

Now all I need to do is to somehow remove the DefaultValueAttribute
from the Image property. Any ideas on this one?

Thanks,
Cosmin

> Hi all,
>
[quoted text clipped - 12 lines]
> Thanks in advance,
> Cosmin

Rate this thread:







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.