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 / Windows Forms / Design Time / September 2005

Tip: Looking for answers? Try searching our database.

Inherited Controls

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Christopher Weaver - 05 Sep 2005 20:43 GMT
When inheriting from a superclass, there is one situation wherein I would
like to hide some of the inheritted controls at design time.  Can I do this?
Tim Wilson - 05 Sep 2005 21:19 GMT
Are you asking about hiding inherited properties or did you really mean
hiding inherited controls within some type of composite control (like a
UserControl)?

Signature

Tim Wilson
.Net Compact Framework MVP

> When inheriting from a superclass, there is one situation wherein I would
> like to hide some of the inheritted controls at design time.  Can I do this?
Christopher Weaver - 05 Sep 2005 21:40 GMT
OK, fair question.  I've created a SuperClass which includes, in addition to
a bunch of code, three visual control elements.  Now I'm creating a test
form to test some of the code and some additional code and the controls are
really in the way of the test buttons and textboxes, etc., that I'm putting
on this test form.  I just don't want to see them at design time.  At run
time, they are hidden by some start up code.

> Are you asking about hiding inherited properties or did you really mean
> hiding inherited controls within some type of composite control (like a
[quoted text clipped - 3 lines]
>> like to hide some of the inheritted controls at design time.  Can I do
> this?
Tim Wilson - 05 Sep 2005 22:37 GMT
So the controls are supposed to be hidden at runtime too? If so then just
set the "Visible" property of each control to false from within the
constructor (sub New in VB). Or is there more to this?

Signature

Tim Wilson
.Net Compact Framework MVP

> OK, fair question.  I've created a SuperClass which includes, in addition to
> a bunch of code, three visual control elements.  Now I'm creating a test
[quoted text clipped - 10 lines]
> >> like to hide some of the inheritted controls at design time.  Can I do
> > this?
Christopher Weaver - 06 Sep 2005 00:18 GMT
Right. Within the Load method of the form, I've set the Visible property to
false on each of the controls that I don't want to see at run time, and that
works.  It's just that they're anoying during design and I was wondering if
I could make them non-visible there as well.  Seems unlikely, but I thought
I would ask anyway.

> So the controls are supposed to be hidden at runtime too? If so then just
> set the "Visible" property of each control to false from within the
[quoted text clipped - 18 lines]
>> >> like to hide some of the inheritted controls at design time.  Can I do
>> > this?
Tim Wilson - 06 Sep 2005 01:07 GMT
So it sounds like you're doing visual inheritance with forms. Is that
correct? If that's the case then, as far as I know, you cannot hide the
controls that are inherited from the base form at design-time. I thought
that you may have been refering to a custom control, like a custom
UserControl, that contains other controls.

Signature

Tim Wilson
.Net Compact Framework MVP

> Right. Within the Load method of the form, I've set the Visible property to
> false on each of the controls that I don't want to see at run time, and that
[quoted text clipped - 24 lines]
> >> >> like to hide some of the inheritted controls at design time.  Can I do
> >> > this?

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.