Click here to Skip to main content
15,885,216 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and 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
professionalsteve_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
Zaf 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
professionalsteve_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
professionalEddy 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
professionalsteve_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
professionalEddy 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
professionalsteve_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
professionalEddy 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
professionalsteve_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
professionalEddy Vluggen7-Dec-12 1:16 
QuestionTesting Practices Pin
AnalogNerd5-Dec-12 4:44
AnalogNerd5-Dec-12 4:44 
AnswerRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 5:36
professionalEddy Vluggen5-Dec-12 5:36 
GeneralRe: Testing Practices Pin
AnalogNerd5-Dec-12 5:45
AnalogNerd5-Dec-12 5:45 
GeneralRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 5:53
professionalEddy Vluggen5-Dec-12 5:53 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 6:29
mveDave Kreskowiak5-Dec-12 6:29 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 6:26
mveDave Kreskowiak5-Dec-12 6:26 
GeneralRe: Testing Practices Pin
Eddy Vluggen5-Dec-12 6:34
professionalEddy Vluggen5-Dec-12 6:34 
GeneralRe: Testing Practices Pin
Dave Kreskowiak5-Dec-12 9:55
mveDave Kreskowiak5-Dec-12 9:55 
GeneralRe: Testing Practices Pin
Eddy Vluggen6-Dec-12 0:08
professionalEddy 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 Dev4-Dec-12 0:19
El Dev4-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
professionalEddy Vluggen4-Dec-12 0:37 
Questionframework 2.0 and win98 Pin
caradri3-Dec-12 22:37
caradri3-Dec-12 22:37 
AnswerRe: framework 2.0 and win98 Pin
Richard MacCutchan3-Dec-12 23:01
mveRichard MacCutchan3-Dec-12 23:01 
AnswerRe: framework 2.0 and win98 Pin
Eddy Vluggen3-Dec-12 23:04
professionalEddy Vluggen3-Dec-12 23:04 
AnswerRe: framework 2.0 and win98 Pin
Pete O'Hanlon3-Dec-12 23:07
mvePete O'Hanlon3-Dec-12 23:07 

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

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