Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Hide an inherited property

Hide an inherited property

Scheduled Pinned Locked Moved Visual Basic
visual-studiohelp
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rochester_tw
    wrote on last edited by
    #1

    I am writing a custom control that inherits from the combo box. I like to hide the DropDownStyle property from the user. I have learned from MS Help and many posted threads to shadow the property with , it hides the property from the property page, but it didn't hide from Intellisense. I must do something wrong, would be glad if anyone can give a suggestion. Here is the code: _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property BTW, I am using Framework 1.0. Many thanks, Tao

    D 2 Replies Last reply
    0
    • R rochester_tw

      I am writing a custom control that inherits from the combo box. I like to hide the DropDownStyle property from the user. I have learned from MS Help and many posted threads to shadow the property with , it hides the property from the property page, but it didn't hide from Intellisense. I must do something wrong, would be glad if anyone can give a suggestion. Here is the code: _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property BTW, I am using Framework 1.0. Many thanks, Tao

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      It's my understanding that your can't hide it from Intellisense because you would have to remove the property in order to do that. Since your inheriting that property from another class, you can't block it. Since the parent class made the property public, you can't change that... I could be wrong so if anyone would like to correct me, please, feel free! :) RageInTheMachine9532

      A 1 Reply Last reply
      0
      • D Dave Kreskowiak

        It's my understanding that your can't hide it from Intellisense because you would have to remove the property in order to do that. Since your inheriting that property from another class, you can't block it. Since the parent class made the property public, you can't change that... I could be wrong so if anyone would like to correct me, please, feel free! :) RageInTheMachine9532

        A Offline
        A Offline
        Anonymous
        wrote on last edited by
        #3

        Thanks for the info, but I hope this isn't the case. Could anyone point me to any document to verify this? Thanks, Tao

        1 Reply Last reply
        0
        • R rochester_tw

          I am writing a custom control that inherits from the combo box. I like to hide the DropDownStyle property from the user. I have learned from MS Help and many posted threads to shadow the property with , it hides the property from the property page, but it didn't hide from Intellisense. I must do something wrong, would be glad if anyone can give a suggestion. Here is the code: _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property BTW, I am using Framework 1.0. Many thanks, Tao

          D Offline
          D Offline
          Dave Kreskowiak
          wrote on last edited by
          #4

          rochester_tw wrote: DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property It didn't hit me until this morning, but you made you Shadowed property Public. Change it to Private and it might solve your problem. RageInTheMachine9532

          A 1 Reply Last reply
          0
          • D Dave Kreskowiak

            rochester_tw wrote: DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _ Public Shadows Property DropDownStyle() As System.Windows.Forms.ComboBoxStyle Get End Get Set(ByVal Value As ComboBoxStyle) End Set End Property It didn't hit me until this morning, but you made you Shadowed property Public. Change it to Private and it might solve your problem. RageInTheMachine9532

            A Offline
            A Offline
            Anonymous
            wrote on last edited by
            #5

            I tried it. It actually got more confusion. The property is still available in Intellisense, it calls something that I can't even tell. I assume it calls the property in the parent class, but it doesn't seem to change the behavior of the control. Thanks for try. Tao

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups