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 / Languages / C# / August 2007

Tip: Looking for answers? Try searching our database.

Derived ListBox Control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Veeneman - 22 Aug 2007 01:02 GMT
I am deriving a custom control from a list box, in order to add the ability
to edit a list item's text. The easiest way to do it is to simply place a
text box at the appropriate position on the list box, edit in the text box,
then get the value from the text box when it loses focus or the user hits
Enter.

Here's my problem: Adding a text box to a UserControl is easy enough. But
can I add one to a control that is derived from the ListBox control, insteal
of the UserControl base class? Any ideas on how to get this done? Thanks
Peter Duniho - 22 Aug 2007 05:03 GMT
> [...]
> Here's my problem: Adding a text box to a UserControl is easy enough. But
> can I add one to a control that is derived from the ListBox control, insteal
> of the UserControl base class? Any ideas on how to get this done? Thanks

The Controls property for all control classes is inherited from the base
Control class.  All controls can have child controls; you just add the
child control to the Controls collection.

Pete
David Veeneman - 22 Aug 2007 10:44 GMT
Thanks--I'll give that a try.

>> [...]
>> Here's my problem: Adding a text box to a UserControl is easy enough. But
[quoted text clipped - 7 lines]
>
> Pete

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.