Results 1 to 3 of 3

Thread: Add properties to a radiobutton.

  1. #1

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    41

    Question Add properties to a radiobutton.

    Hi all, I have searched hard and haven't found anything to help me out on my latest endeavor. I need to take a radiobutton and add my own properties to it. Is this even possible? If so, could someone lead me to a good article, tutorial or sample code to get me on my way?

    Thanks for your help.

    Tomson

  2. #2
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You have to make your own Radiobutton but you can inherit from the standard one. Although the big question is why add properties to the radiobutton?
    VB Code:
    1. Public Class RadioButtonEx
    2.   Inherits RadioButton
    3.  
    4.   Private _MyProperty As String
    5.  
    6.   Public Property MyProperty As String
    7.     Get
    8.        Return _MyProperty
    9.     End Get
    10.     Set(ByVal Value As String)
    11.        _MyProperty=Value
    12.     End Set
    13.   End Property
    14. End Class

  3. #3

    Thread Starter
    Member
    Join Date
    May 2003
    Posts
    41
    Thanks a lot. That will be very helpful. The reason I want to add my own properties, is to better track which buttons are true and which are false, without using an array, and better simulate some of the lost functionallity that I liked in Vb6. I know there are better features in .net but some of the features they took away I don't understand why. Well anyway, thanks again.
    You are always very helpful and insightful.

    Thanks,

    Tomson.

Posting Permissions

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



Click Here to Expand Forum to Full Width