How can I detect when a user presses a button on a UserControl property item?

I am building a UserControl, and one of my properties has a button on it [...]   I want to be able to tell when they pressed that button, so I can open a little form.  Similar to the way property pages work in Infragistics products.

I'd be grateful for any help.
Sheryl
LVL 1
Agent909Asked:
Who is Participating?
 
Juan_BarreraCommented:
Mmm...I don't think so. That's a Visual Studio internal feature, not something that you can change.
0
 
Juan_BarreraCommented:
Hi Sheryl,
You can handle the onclick event of the button. Are you adding the button dynamically or it's in the markup?
0
 
Agent909Author Commented:
Well hello, Juan.  The button I'm talking about is a tiny little thing on the property line itself.  Are you sure this is the button you're talking about?  The button is added by MS when I add a property that's a collection.  Just a sec and I'll search for a button click event...  No, I don't see where I can access the button's click event.
0
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
Juan_BarreraCommented:
Hi again Shery,
Can you please post the code for that property you are talking about?
0
 
Agent909Author Commented:
Private _f As New Collection
    Public Property Fields() As Collection
        Get
            Return _f
        End Get
        Set(ByVal value As Collection)
            _f = value
        End Set
    End Property
Private _f As New Collection
    Public Property Fields() As Collection
        Get
            Return _f
        End Get
        Set(ByVal value As Collection)
            _f = value
        End Set
    End Property

Open in new window

0
 
Juan_BarreraCommented:
So, I think that what you want is to display a little form when the property is "expanded", after being "collapsed", like this:

 Private _f As New Collection
 Public Property Fields ...

Visual Studio shows a little button with a "+" sign on the left to expand it. Is that the button you are talking about?

0
 
Agent909Author Commented:
I thought about using the plus sign, but I'd rather use the actual button that has three dots on it.  On the property it will say:  (Collection).  If you go to the right of that and press with the mouse,  a button will appear there.  This is assuming that you entered the Fields property.  Do you think there's any way to check for the click event of that button?
0
 
Agent909Author Commented:
I was afraid of that.  Well, thank you anyway.  My user control write reports, and actually prints them.  It's been a lot of fun.  Thank you for your help.  See ya next time.
0
 
Juan_BarreraCommented:
No worries! See you!
0
 
Mike TomlinsonMiddle School Assistant TeacherCommented:
0
 
Agent909Author Commented:
Idle Mind,

Thank you for these GREAT links.  I will try out the one written in VB.  I may be able to achieve my goal by getting this to work!

~Sheryl
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.