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. .NET (Core and Framework)
  4. [Flags()] and Property window

[Flags()] and Property window

Scheduled Pinned Locked Moved .NET (Core and Framework)
question
1 Posts 1 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.
  • P Offline
    P Offline
    Palladino
    wrote on last edited by
    #1

    Perhaps this is a stupid question, but I sought plenty and I didn't get to find. Imagine that there is an enumeration as the one that proceeds:

    [Flags ()]
    public enum AnyOptions
    {
    Option1 = 1,
    Option2 = 2,
    Option3 = 4
    }

    Now there is a property in a specialization of System.Windows.Forms.TextBox

    public class MyCustomTextBox: System.Windows.Forms.TextBox
    {
    private AnyOptions options = AnyOptions.Option1;

    \[Browsable(true)\] //this is the point!!  
    public AnyOptions Options  
    {  
    	get {return this.options;}  
    	set {this.options = value;}  
    }  
    

    }

    Question: As I do for this property to have a "normal" behavior in the properties window. I imagine that it is some editor type, I don´t know. Thanks in advance, Marcelo Palladino Brazil

    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