![]() |
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:
Thanks :icon_wink: |
Re: cration of a new control, problem with adding new controls
The error that I receive is this:
Quote:
|
Re: cration of a new control, problem with adding new controls
I just might figured it by myself I just used this code:
Quote:
|
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
|
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:
:
:
|
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! |
| All times are GMT -5. The time now is 4:01 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC