CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Oct 2009
    Posts
    6

    Child control properties

    Hi. Does anyone knows if there's a way of adding the properties of a control to its parent? Without having to rewrite all the properties...
    For example, if I have an user control with a button inside, and I want to have the "text align" property of the button, in the list of properties of the usercontrol. Is that possible?
    If not, is there a way of making the child control of an usercontrol editable?
    Thanks!

  2. #2
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: Child control properties

    Only way I know off is to either expose the property yourself (which I guess is what you mean with "rewriting it") or expose/access the child control directly using FindControl and make a property to expose the button, or similar things like that.

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

Featured