Home All Groups Group Topic Archive Search About
Author
27 Jun 2006 9:32 AM
J French
I am writing a user control and have encountered a problem. I need to create
a property that will provide the user with several property value choices
that will appear in a drop-down list similar to that for the form
"BackgroundColor" property. My property will be a listing of strings. How do
I code this in the Set and Get areas for the creation of this property ? I
appreciate any help that can be provided.
John


--
jffrenc***@earthlink.net

Author
27 Jun 2006 3:34 PM
Ahmed
Hi,

The following code will get you a regular dropdown with value. But
without tabs or images in the drop down:

Dim testingVariable As testing
    Public Property DropdownProperty() As testing
        Get
            Return testingVariable
        End Get
        Set(ByVal value As testing)
            testingVariable = value
        End Set
    End Property

    Public Enum testing
        Value1
        Value2
        Value3
    End Enum


The property drop down would have value1,value2, and value3. If you are
interested in a more complex ones, take a look at this link:

http://www.ottawacommunity.net/Portals/0/Content/VSNETDesignTimeTools.ppt

Cheers,
Ahmed
J French wrote:
Show quoteHide quote
> I am writing a user control and have encountered a problem. I need to create
> a property that will provide the user with several property value choices
> that will appear in a drop-down list similar to that for the form
> "BackgroundColor" property. My property will be a listing of strings. How do
> I code this in the Set and Get areas for the creation of this property ? I
> appreciate any help that can be provided.
> John
>
>
> --
> jffrenc***@earthlink.net