Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Apr 15th, 2008, 8:05 AM   #1
beni_dude
Newbie
 
beni_dude's Avatar
 
Join Date: Apr 2008
Posts: 19
Rep Power: 0 beni_dude is on a distinguished road
Question cration of a new control, problem with adding new controls

Hello,
I have a problem when I try to add a new control to the panel control, I'm sure its a newbie problem but still I can't go around it!

What I'm trying to do is to create a new control which well be only one panel control and in it twelve text box (array of text box).

I'm also adding the code

Quote:
public partial class MonthPick : Control
{
public const int arrSize = 12;

public MonthPick()
{
InitializeComponent();

TextBox[] boxArr = new TextBox[arrSize];
initBoxArr(boxArr, arrSize);

//the problem is with the next line
panel1.Controls.Add = boxArr;
}

private void initBoxArr(TextBox[] boxArr, int arrSize)
{
for (int i = 0; i < arrSize; i++)
{
boxArr[i] = new TextBox();
}
}

protected override void OnPaint(PaintEventArgs pe)
{
base.OnPaint(pe);
}


}
I just don't know how to add the array of text box's

Thanks
beni_dude is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
adding an image control at run time diamondustice Visual Basic 4 Feb 19th, 2006 9:12 PM
How to handle keyboard events in an app containing ActiveX Controls ? George Giolfan Visual Basic .NET 0 Aug 7th, 2005 3:07 AM
Debugging ActiveX controls (.ocx) in Delphi 5 nauman73 Delphi 1 Jun 27th, 2005 4:13 PM
Tab controls some1 C++ 0 Apr 17th, 2005 3:28 PM
adding control variables Jayydedd Java 2 Mar 23rd, 2005 3:22 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:54 AM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC