Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Custom control property default value
Message
General information
Forum:
ASP.NET
Category:
Forms
Title:
Custom control property default value
Miscellaneous
Thread ID:
00637183
Message ID:
00637183
Views:
37
Trying to do a custom compound win control in VB.net. (my first) I'm new to VB, coming from a VFP back ground, I find it easy and hard at the same time.

I've run into several problems. I tried adding a font property but could not get it to work in the designer. When I clicked on the property the font dialog box would come up but I was not getting the selections returned and the ide would blow up. So I added a label to my custom control and made it invisible. The used its font as my property that worked but there has got to be a better way. I also want to be able to set a default value and can't get that to work either.

This wont work. How can I do this?
<Category("Gradient Back Ground"), _
    Description("Selects Start Color of Gradient Back Ground"), _
    Defaultvalue(color.skyblue), _
    Bindable(False)> _
    Public Property GBStartColor() As Color
        Get
            GBStartColor = _GBStartColor
        End Get
        Set(ByVal Value As Color)
            _GBStartColor = Value
        End Set
    End Property
TIA

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Reply
Map
View

Click here to load this message in the networking platform