Results 1 to 3 of 3

Thread: [RESOLVED] Combobox style for public properties

  1. #1
    .Net Member dday9's Avatar
    Join Date
    Mar 11
    Location
    South Louisiana
    Posts
    2,323

    Resolved [RESOLVED] Combobox style for public properties

    I'm creating a user control, and I'd like to know how do you set certain values for a property? For example, boolean values during design time gives you the dropdown with "true" or "false". More specifically I'm using the values in style from a progressbar. I don't know if I'm explaining myself correctly, so imma post a screen shot of waht I meen.
    Attachment 91265

    Hope y'all get what I'm trying to say.
    Vb.Net Contributions:-Here-
    Game Contributions:-Here- New - 2d map creator
    XNA in Vb.Net Tutorials:-Here-

    Links:
    LegalShield | AUP

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 02
    Posts
    21,786

    Re: Combobox style for public properties

    Properties that have the dropdown like that are enum types...where there is a defined list of values to select from.

    For example, the style of a progress bar is defined "As ProgrssBarStyle" (I'm guessing at the name really, but this illustrates the point) ... which is defined as such:
    Code:
    Public Enum ProgressBarStyle
      Blocks = 0
      Continous
      Marquee
    End Enum
    And then the property:
    Code:
    Private _Style as ProgressBarStyle
    
    Public Property Set Style(Value as ProgrssBarStyle)
      _Style = Value
    End property
    
    Public Property Get Style as ProgressBarStyle
      return _Style
    End Property
    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.-I also subscribe to all threads I participate, so there's no need to pm when there's an update.*
    *Proof positive that searching the forums does work: View Thread *
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *
    * Use Offensive Programming, not Defensive Programming. * On Error Resume Next is error ignoring, not error handling(tm).
    "There is a major problem with your code, and VB wants to tell you what it is.. but you have decided to put your fingers in your ears and shout 'I'm not listening!'" - si_the_geek on using OERN

  3. #3
    .Net Member dday9's Avatar
    Join Date
    Mar 11
    Location
    South Louisiana
    Posts
    2,323

    Re: Combobox style for public properties

    A ha! Thanks tg. I've never use Enum's before :P
    Vb.Net Contributions:-Here-
    Game Contributions:-Here- New - 2d map creator
    XNA in Vb.Net Tutorials:-Here-

    Links:
    LegalShield | AUP

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •