Accessing user control components at design time

  • Thread starter Thread starter Martin
  • Start date Start date
M

Martin

Hi,

I have a simple question: Is there a way to access a component in a
user control in designer? To be more detailed I'm trying to create a
user control which contains label, textbox and a splitter - label
describes the textbox and the splitter decides how much of the space
has label or textbox. I'm able to access the splitter at run-time but
in the designer I'm not able to change its possition. I tried to make
a property named Splitter which provides the private splitter object
but this didn't work out.

Thanks for your help

Martin
 
Hi Martin
Creating a property is one step. In addition to creating a property , you
need to add the browsable attribute to it with value browsable= true .
this attribute when set to true in a property of a user control meant that
this property is browsable in the in the property panel at design time (
which is the functionally you want ). You can read more on that link

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfSystemComponentModelBrowsableAttributeClassTopic.asp
Mohamed M .Mahfouz
Developer Support Engineer
ITWorx on behalf of Microsoft EMEA GTSC
 
Back
Top