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 Controls / February 2005

Tip: Looking for answers? Try searching our database.

Deleting an "Icon" UserControl property using the Delete button when focus is in the PropertyGrid?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joergen Bech <jbech<NOSPAM>@ - 17 Feb 2005 16:01 GMT
Having defined an icon property on my usercontrol as show below,
I can set it just fine using the PropertyGrid. But for some reason I
cannot delete it, once it has been set, i.e. mark the "(icon)" text
and pressing the Delete button, as is the case for standard
"BackgroundImage" properties, etc.

Am I missing an attribute on the property so the Delete button
will assign "Nothing" to the Icon property?!?

TIA,

Joergen Bech

---snip---

   Private _HeaderIcon As System.Drawing.Icon

   Public Property HeaderIcon() As System.Drawing.Icon
       Get
           Return Me._HeaderIcon
       End Get
       Set(ByVal Value As System.Drawing.Icon)
           Me._HeaderIcon = Value
           Me.Invalidate()
       End Set
   End Property
Mick Doherty - 18 Feb 2005 00:22 GMT
<System.ComponentModel.DefaultValue(GetType(Icon), Nothing)> _
Public Property HeaderIcon() As Icon
...

Signature

Mick Doherty
http://dotnetrix.co.uk/nothing.html

> Having defined an icon property on my usercontrol as show below,
> I can set it just fine using the PropertyGrid. But for some reason I
[quoted text clipped - 22 lines]
>        End Set
>    End Property

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.