Re: Control Properties of Type System.Drawing.Color

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeff Johnson

    Re: Control Properties of Type System.Drawing.Color

    "Nathan Sokalski" <njsokalski@hot mail.comwrote in message
    news:er%23hyAFO JHA.1896@TK2MSF TNGP02.phx.gbl. ..
    Actually, it is a custom control that inherits System.Web.UI.C ontrol. My
    code for the BackgroundColor property is:
    >
    Public WriteOnly Property BackgroundColor () As System.Drawing. Color
    Set(ByVal value As System.Drawing. Color)
    Me._backgroundc olor = value
    End Set
    End Property
    >
    Me._backgroundc olor is declared as:
    >
    Private _backgroundcolo r As System.Drawing. Color
    >
    I know that my syntax for the property declaration is correct, I have used
    it many times in other classes for other types (such as String, Integer,
    etc.), just never with System.Drawing. Color. Any ideas? Thanks.
    Since this is derived from a Web class, I can't really help much, being a
    desktop guy, but I have to wonder: why WriteOnly?


  • Nathan Sokalski

    #2
    Re: Control Properties of Type System.Drawing. Color

    Sometimes when developing my controls I don't add the Get's until later so
    that I can see more of the properties on the screen at once. And since it is
    a control intended primarily for declarative usage, it will allow me to use
    it normally when testing. Yes, I do plan on adding the Get's before putting
    it on my site, and maybe I do have a strange style, but most of the controls
    I write are simply for the enjoyment, so who cares?
    --
    Nathan Sokalski
    njsokalski@hotm ail.com
    有声小说网为广大读者提供热门小说在线免费阅读,本站收集的网络文学小说情节跌宕起伏,有声小说网是值得书友们收藏的小说在线阅读网。


    "Jeff Johnson" <i.get@enough.s pamwrote in message
    news:eAIQUWGOJH A.4092@TK2MSFTN GP06.phx.gbl...
    "Nathan Sokalski" <njsokalski@hot mail.comwrote in message
    news:er%23hyAFO JHA.1896@TK2MSF TNGP02.phx.gbl. ..
    >
    >Actually, it is a custom control that inherits System.Web.UI.C ontrol. My
    >code for the BackgroundColor property is:
    >>
    >Public WriteOnly Property BackgroundColor () As System.Drawing. Color
    > Set(ByVal value As System.Drawing. Color)
    > Me._backgroundc olor = value
    > End Set
    >End Property
    >>
    >Me._background color is declared as:
    >>
    >Private _backgroundcolo r As System.Drawing. Color
    >>
    >I know that my syntax for the property declaration is correct, I have
    >used it many times in other classes for other types (such as String,
    >Integer, etc.), just never with System.Drawing. Color. Any ideas? Thanks.
    >
    Since this is derived from a Web class, I can't really help much, being a
    desktop guy, but I have to wonder: why WriteOnly?
    >

    Comment

    Working...