?
Solved

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

Posted on 2008-11-04
11
Medium Priority
?
148 Views
Last Modified: 2010-04-23
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
0
Comment
Question by:Agent909
  • 5
  • 5
11 Comments
 
LVL 20

Expert Comment

by:Juan_Barrera
ID: 22882754
Hi Sheryl,
You can handle the onclick event of the button. Are you adding the button dynamically or it's in the markup?
0
 
LVL 1

Author Comment

by:Agent909
ID: 22882774
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
 
LVL 20

Expert Comment

by:Juan_Barrera
ID: 22882781
Hi again Shery,
Can you please post the code for that property you are talking about?
0
Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

 
LVL 1

Author Comment

by:Agent909
ID: 22882811
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
 
LVL 20

Expert Comment

by:Juan_Barrera
ID: 22882834
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
 
LVL 1

Author Comment

by:Agent909
ID: 22882878
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
 
LVL 20

Accepted Solution

by:
Juan_Barrera earned 2000 total points
ID: 22882887
Mmm...I don't think so. That's a Visual Studio internal feature, not something that you can change.
0
 
LVL 1

Author Comment

by:Agent909
ID: 22882907
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
 
LVL 20

Expert Comment

by:Juan_Barrera
ID: 22882915
No worries! See you!
0
 
LVL 86

Expert Comment

by:Mike Tomlinson
ID: 22886638
0
 
LVL 1

Author Comment

by:Agent909
ID: 22887737
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

Featured Post

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Hello there! As a developer I have modified and refactored the unit tests which was written by fellow developers in the past. On the course, I have gone through various misconceptions and technical challenges when it comes to implementation. I would…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question