![]() |
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
Newbie
Join Date: Apr 2008
Posts: 19
Rep Power: 0
![]() |
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:
Thanks |
|
|
|
|
|
|
#2 | |
|
Newbie
Join Date: Apr 2008
Posts: 19
Rep Power: 0
![]() |
Re: cration of a new control, problem with adding new controls
The error that I receive is this:
Quote:
|
|
|
|
|
|
|
#3 | |
|
Newbie
Join Date: Apr 2008
Posts: 19
Rep Power: 0
![]() |
Re: cration of a new control, problem with adding new controls
I just might figured it by myself I just used this code:
Quote:
__________________
NULL is all around me! |
|
|
|
|
|
|
#4 |
|
Newbie
Join Date: Apr 2008
Posts: 19
Rep Power: 0
![]() |
Re: cration of a new control, problem with adding new controls
I just want to create a control with 12 other controls I can't believe its so hard
__________________
NULL is all around me! |
|
|
|
|
|
#5 |
|
Caffeinated Neural Net
Join Date: Jun 2005
Location: Dry west coast of Canada
Posts: 929
Rep Power: 4
![]() |
Re: cration of a new control, problem with adding new controls
Are you trying to actually create a new control (ie, a custom control), or are you just trying to stick a bunch of stuff onto a panel? If it's the former, it's a little involved, particularly if you want design-time support (support in the drag-and-drop 'forms designer'). If it's the latter, you can just add them in the designer. If you need to iterate through them with array notation, you add the TextBoxes (or whatever) in the designer, and give them descriptive names (not necessary, but a good habit to get into). Then, in your code, you create an array of TextBoxes, and assign the references:
C# Syntax (Toggle Plain Text)
C# Syntax (Toggle Plain Text)
__________________
A man's knowledge is like an expanding sphere, the surface corresponding to the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all. - L. Sprague de Camp |
|
|
|
|
|
#6 |
|
Newbie
Join Date: Apr 2008
Posts: 19
Rep Power: 0
![]() |
Re: cration of a new control, problem with adding new controls
First thing thanks for the Replay!
Second yes I'm trying to create an custom control which is a bit of a problem. Now I did manage to create the array of the controls (in this case array of text box) but WHEN I create it in the panel and make sure to add the text box array I get only one text box, I think that its actually the twelfth box's in the same position so now I need to move them in the panel so they won't be on the top of each other. If some one can come up with a simple clear cut way it will be great!
__________________
NULL is all around me! |
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
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 |