PC Review


Reply
Thread Tools Rate Thread

Control that adds a control

 
 
=?Utf-8?B?Wm9ycGllZG9tYW4=?=
Guest
Posts: n/a
 
      3rd Aug 2005
Looking for expert guidance here.

I have a user control. When I drop it onto the form at design time, I want
it to create a textbox and add it to the same form. Can this be done?


--
--Zorpie
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Wm9ycGllZG9tYW4=?=
Guest
Posts: n/a
 
      3rd Aug 2005
Let be be a teeny bit more clear.

If I add the code:

Private Sub UserControl1_ParentChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.ParentChanged
Me.Parent.Controls.Add(New TextBox)
End Sub

The textbox gets added to the parent form. The PROBLEM I am trying to solve
is that although you can see the textbox, you cannot access it's properties
in the properties window. THAT's what I need to figure out.

Thanks.

--
--Zorpie


"Zorpiedoman" wrote:

> Looking for expert guidance here.
>
> I have a user control. When I drop it onto the form at design time, I want
> it to create a textbox and add it to the same form. Can this be done?
>
>
> --
> --Zorpie

 
Reply With Quote
 
=?Utf-8?B?Wm9ycGllZG9tYW4=?=
Guest
Posts: n/a
 
      3rd Aug 2005
The TabControl manages to do this when you add a Page tothe TabPages
collection, so I KNOW it's possible!


:-)

--
--Zorpie


 
Reply With Quote
 
=?Utf-8?B?Wm9ycGllZG9tYW4=?=
Guest
Posts: n/a
 
      4th Aug 2005
I see that no one has an answer... the reason why... because you CANT. I
just spent a couple hours on the phone with MS, and they researched the
VB.NET code itself and it's just not possible. Bummer. Just thought I'd
post this in case anyone else burns rubber trying to figure this one out
sometime.

-Zorpie
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control that adds properties to other controls Johnny Jörgensen Microsoft VB .NET 2 26th Jun 2007 01:34 PM
How do I control to which cells a user adds data? =?Utf-8?B?cG1vMw==?= Microsoft Excel Worksheet Functions 1 22nd Dec 2004 07:46 PM
Dataview Rowfilter setting adds blank records to the dropdown control when I use Databind Mohan Sundaram via .NET 247 Microsoft ADO .NET 0 10th Aug 2004 06:35 PM
Re: Convert code snippit (that adds a control to a form) from VB6 to VB.NET Jay B. Harlow [MVP - Outlook] Microsoft VB .NET 3 22nd Mar 2004 08:46 PM
possible to create a control that adds portions of itself different places? Christian H Microsoft ASP .NET 0 8th Aug 2003 11:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:27 AM.