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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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?
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.
Juan_BarreraCommented:
Hi again Shery,
Can you please post the code for that property you are talking about?
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

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

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?

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?
Juan_BarreraCommented:
Mmm...I don't think so. That's a Visual Studio internal feature, not something that you can change.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
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.
Juan_BarreraCommented:
No worries! See you!
Mike TomlinsonHigh School Computer Science, Computer Applications, and Mathematics TeachersCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.