Click here to Skip to main content
11,631,796 members (73,046 online)

.NET Framework

 
GeneralRe: [VB.NET 2008] How to detect if a page of a TabControl is selected (Windows CE) Pin
steve_949661311-Dec-12 21:20
membersteve_949661311-Dec-12 21:20 
GeneralRe: [VB.NET 2008] How to detect if a page of a TabControl is selected (Windows CE) Pin
Zaf Khan12-Dec-12 2:13
memberZaf Khan12-Dec-12 2:13 
Question[VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966135-Dec-12 4:54
membersteve_94966135-Dec-12 4:54 
AnswerRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen5-Dec-12 5:40
memberEddy Vluggen5-Dec-12 5:40 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966135-Dec-12 20:59
membersteve_94966135-Dec-12 20:59 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen6-Dec-12 2:27
memberEddy Vluggen6-Dec-12 2:27 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966136-Dec-12 3:26
membersteve_94966136-Dec-12 3:26 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen6-Dec-12 5:02
memberEddy Vluggen6-Dec-12 5:02 
steve_9496613 wrote:
In the designer I create:
1 Form with 1 TabControl with 1 page
1 UserControl with 1 Button and 2 NumericUpDown
(in my first post there is the code of the Form and the code of the UserControl)

At runtime I add 10 pages to the TabControl with a copy of the UserControl in each page.

My problem is in these 10 pages, for this reason I wrote "at runtime" in the topic title.

Good explanation Thumbs Up | :thumbsup:

"NUD1", the name-property of the UpDown control, must be unique within the form. It'll generate a variable with that name, and that's what "NUD1" points to; it's not a property of the tabpage, it's the name of a single control.

Ideally, you'd have your own type of tabpage, but I don't know whether the designer would accept that. Might make it impossible to show the page at all in the designer.

The "easy" way is to loop trough all the controls on the current tabpage. There's a Controls-collection that you'd have to loop through, and check whether that's the control (of type numericupdown) that you're looking for.

Not very elegant at all, is it?

So, I'd suggest putting everything you want on that page in a single UserControl, and make it's values available over properties. That way you can instantiate the same control ten times, and still have all the logic and layout in a single place.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
steve_94966136-Dec-12 21:25
membersteve_94966136-Dec-12 21:25 
GeneralRe: [VB.NET 2008] How to get control on objects created at runtime Pin
Eddy Vluggen7-Dec-12 1:16
memberEddy Vluggen7-Dec-12 1:16 
QuestionTesting Practices Pin
Andrew Stoute5-Dec-12 4:44
memberAndrew Stoute5-Dec-12 4:44 
AnswerRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 5:36
memberEddy Vluggen5-Dec-12 5:36 
GeneralRe: Testing Practices Pin
Andrew Stoute5-Dec-12 5:45
memberAndrew Stoute5-Dec-12 5:45 
GeneralRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 5:53
memberEddy Vluggen5-Dec-12 5:53 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 6:29
mvpDave Kreskowiak5-Dec-12 6:29 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 6:26
mvpDave Kreskowiak5-Dec-12 6:26 
GeneralRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 6:34
memberEddy Vluggen5-Dec-12 6:34 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 9:55
mvpDave Kreskowiak5-Dec-12 9:55 
GeneralRe: Testing Practices Pin
Eddy Vluggen6-Dec-12 0:08
memberEddy Vluggen6-Dec-12 0:08 
QuestionHow to make a list view and gallerie view on a product page list on some e-commerce Pin
El daniel4-Dec-12 0:19
memberEl daniel4-Dec-12 0:19 
AnswerRe: How to make a list view and gallerie view on a product page list on some e-commerce Pin
Eddy Vluggen4-Dec-12 0:37
memberEddy Vluggen4-Dec-12 0:37 
Questionframework 2.0 and win98 Pin
caradri3-Dec-12 22:37
membercaradri3-Dec-12 22:37 
AnswerRe: framework 2.0 and win98 Pin
Richard MacCutchan3-Dec-12 23:01
mvpRichard MacCutchan3-Dec-12 23:01 
AnswerRe: framework 2.0 and win98 Pin
Eddy Vluggen3-Dec-12 23:04
memberEddy Vluggen3-Dec-12 23:04 
AnswerRe: framework 2.0 and win98 Pin
Pete O'Hanlon3-Dec-12 23:07
protectorPete O'Hanlon3-Dec-12 23:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web01 | 2.8.150728.1 | Last Updated 28 Jul 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid