Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

User Control Property Events

Posted on 2009-04-09
2
Medium Priority
?
186 Views
Last Modified: 2012-05-06
I created a user control that contains a label, Label1, and several public properties, including the string DPDC.

I would like the text property of Label1 to be set to the value of string property DPDC when this property is set.

How can I add an event to perform this?

Thanks
Private _dPDC As String
    Public Property DPDC() As String
        Get
            DPDC = _dPDC
        End Get
        Set(ByVal value As String)
            _dPDC = value
        End Set
 
    End Property

Open in new window

0
Comment
Question by:GIANTOCR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 2

Accepted Solution

by:
nicksbell earned 2000 total points
ID: 24105808
Just put it in the Set statement of the property.
Private _dPDC As String
    Public Property DPDC() As String
        Get
            DPDC = _dPDC
        End Get
        Set(ByVal value As String)
            _dPDC = value
            Label1.Text = Value
        End Set
 
    End Property

Open in new window

0
 

Author Closing Comment

by:GIANTOCR
ID: 31568440
That was simple enough. Thanks for your help.
0

Featured Post

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses

596 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