Add New TabPanel with Controls

[quote=224552:@Norman Palardy]I have a VERY strong suspicion this isn’t going to work right
But …[/quote]

It’s working great! Perfectly… seemingly. haha

What, in particular, makes you think it shouldn’t work?

I’m using a ControlSet (“txt_Document,” which is just a TextArea). Should I DIM newTextArea as an actual txt_Document or is what I have OK? (Works either way… just wondering if one way is “better” than the other.)

[quote=224553:@Christopher Lester]It’s working great! Perfectly… seemingly. haha

What, in particular, makes you think it shouldn’t work?

I’m using a ControlSet (“txt_Document,” which is just a TextArea). Should I DIM newTextArea as an actual txt_Document or is what I have OK? (Works either way… just wondering if one way is “better” than the other.)[/quote]

You could simplify your code :

[code]dim newTextArea as New txt_Document

tabpanel_Documents.Append newDoc

newTextArea.Parent = tabpanel_Documents
newTextArea.PanelIndex = tabpanel_Documents.PanelCount - 1[/code]

[quote=224553:@Christopher Lester]It’s working great! Perfectly… seemingly. haha
What, in particular, makes you think it shouldn’t work?
[/quote]
The fact that I work here and know more about the internals than you do
And that other engineers here also say “Yeah this wont work right”
But … :stuck_out_tongue:

[quote=224558:@Norman Palardy]The fact that I work here and know more about the internals than you do
And that other engineers here also say “Yeah this wont work right”
But … :P[/quote]

I’m not questioning whether or not you’re right. I trust your judgment. What I’m asking is, “What specific bits of code” are causing your pessimism (so I know what to fix).

I thought that code was exactly what you said to do! Use a Control Set, put it on the new TabPanel page.

I meant specifically what is it that is going to cause problems?

It’s working exactly as I intend it to. That’s the only reason I’m confused by your evaluation that it won’t work right.

Is txt_document your control set on the layout ?
if so then you’re right
It should just work
Apologies

Norm should never try to read forums posts & write code at the same time :slight_smile:

Yes!

Now, onward!

Thanks for the help. :slight_smile:

Sorry for the noise then :slight_smile: