Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Building Controls / June 2004

Tip: Looking for answers? Try searching our database.

Constituent Controls and Design Time

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jim-M - 27 Jun 2004 00:05 GMT
I'm inheriting TextBox in my custom control...it has a property that is
type TextBox and will point to two other TextBox controls on the form.

This is working correctly, however at design time, the Property Browser
displays a "+" sign when the property is set to a control other than
(none).  This toggles the detail of the TextBox that the property value
points to.

Is there an attribute I can apply to the property declaration that will
control whether this little plus-minus detail is available at design
time in the Property Browser?  It would be inappropriate in my case to
be able to modify the underlying properties of the control pointed to by
the property, as this control is
always available at design time.

I've declared the property as such:

<DesignerSerializationVisibility(DesignerSerializationVisibility.Visible
)> _
Public Property StateTextBox() As TextBox
 Get
   Return _StateTextBox
 End Get
 Set(ByVal Value As TextBox)
   _StateTextBox = Value
 End Set
End Property
Private _StateTextBox As TextBox
Jim-M - 27 Jun 2004 00:13 GMT
Sorry, that should have read "will point to *another* TextBox"...

> I'm inheriting TextBox in my custom control...it has a property that is
> type TextBox and will point to two other TextBox controls on the form.
[quoted text clipped - 12 lines]
>
> I've declared the property as such:

<DesignerSerializationVisibility(DesignerSerializationVisibility.Visible
> )> _
> Public Property StateTextBox() As TextBox
[quoted text clipped - 6 lines]
> End Property
> Private _StateTextBox As TextBox

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.