Duplicating Tab page and controls therein 
Author Message
 Duplicating Tab page and controls therein

Hello all!

I'm upgrading my app (short version - reads a text file containing camera
data and populates various listboxes, checkboxes, and text fields based on
data therein) to allow an arbitrary number of cameras to be accounted for.

My plan is to use a Tab control (ssTab at this moment), and add a page for
each camera found.

My question is this - how does one "copy" a tab page, or generate copies of
every control on that page, pasting them into the new page in the right
places and all that fun?  Am I *REALLY* looking at a big pile of code here?

Much thanks to all for any help provided!!

    -Steve



Mon, 08 Dec 2003 06:11:49 GMT  
 Duplicating Tab page and controls therein
Steve,
Put all of the controls on one frame, named fraMain,
then, when the user clicks on a tab, you can execute:

Set fraMain.Container = sstabMain

Your frame will be moved to the selected tab. Now, you need to refresh the
data in your controls.



Quote:
> Hello all!

> I'm upgrading my app (short version - reads a text file containing camera
> data and populates various listboxes, checkboxes, and text fields based on
> data therein) to allow an arbitrary number of cameras to be accounted for.

> My plan is to use a Tab control (ssTab at this moment), and add a page for
> each camera found.

> My question is this - how does one "copy" a tab page, or generate copies
of
> every control on that page, pasting them into the new page in the right
> places and all that fun?  Am I *REALLY* looking at a big pile of code
here?

> Much thanks to all for any help provided!!

>     -Steve



Mon, 08 Dec 2003 06:36:40 GMT  
 Duplicating Tab page and controls therein
Sounds straightforward, but would this create additional groups of controls?
I was *really* hoping I could do something like:

    sstab1.tabs = sstabs1.tabs + 1

And have it automatically duplicate the contents of .tab(0) into .tab(1),
but no dice.  Momma said there'd be days like this.

Thanks!


Quote:
> Steve,
> Put all of the controls on one frame, named fraMain,
> then, when the user clicks on a tab, you can execute:

> Set fraMain.Container = sstabMain

> Your frame will be moved to the selected tab. Now, you need to refresh the
> data in your controls.



> > Hello all!

> > I'm upgrading my app (short version - reads a text file containing
camera
> > data and populates various listboxes, checkboxes, and text fields based
on
> > data therein) to allow an arbitrary number of cameras to be accounted
for.

> > My plan is to use a Tab control (ssTab at this moment), and add a page
for
> > each camera found.

> > My question is this - how does one "copy" a tab page, or generate copies
> of
> > every control on that page, pasting them into the new page in the right
> > places and all that fun?  Am I *REALLY* looking at a big pile of code
> here?

> > Much thanks to all for any help provided!!

> >     -Steve



Mon, 08 Dec 2003 07:36:12 GMT  
 Duplicating Tab page and controls therein
Dude, you ROCK!

Now I have to hurry up and get hitched so I can name my firstborn after ya
;-)

Off to disect, there are things in there that will....well, let's just say
I'll be getting that challenge I wanted today.

Thanks, Ken!

    -Steve


Quote:
> Try the attached. The way this one's set up, the controls that are to be
> displayed on each tab are on a seperate form and I'm using SetParent to
show
> it on a tab.. Code's in place to add tabs and forms by clicking a button..
> give it a shot..



> > Hello all!

> > I'm upgrading my app (short version - reads a text file containing
camera
> > data and populates various listboxes, checkboxes, and text fields based
on
> > data therein) to allow an arbitrary number of cameras to be accounted
for.

> > My plan is to use a Tab control (ssTab at this moment), and add a page
for
> > each camera found.

> > My question is this - how does one "copy" a tab page, or generate copies
> of
> > every control on that page, pasting them into the new page in the right
> > places and all that fun?  Am I *REALLY* looking at a big pile of code
> here?

> > Much thanks to all for any help provided!!

> >     -Steve



Mon, 08 Dec 2003 07:41:21 GMT  
 Duplicating Tab page and controls therein
Aha!  I knew I'd have a question or nine....I can't seem to figure out how
to retrieve the contents of, say, the Text1 textbox on the newly created
second panel - a check of form2.text1.ubound shows that only one exists...

Just this one more question and I promise, that'll be all until the next
one!!  ;-)

Thanks,

    Stev


Quote:
> Try the attached. The way this one's set up, the controls that are to be
> displayed on each tab are on a seperate form and I'm using SetParent to
show
> it on a tab.. Code's in place to add tabs and forms by clicking a button..
> give it a shot..



> > Hello all!

> > I'm upgrading my app (short version - reads a text file containing
camera
> > data and populates various listboxes, checkboxes, and text fields based
on
> > data therein) to allow an arbitrary number of cameras to be accounted
for.

> > My plan is to use a Tab control (ssTab at this moment), and add a page
for
> > each camera found.

> > My question is this - how does one "copy" a tab page, or generate copies
> of
> > every control on that page, pasting them into the new page in the right
> > places and all that fun?  Am I *REALLY* looking at a big pile of code
> here?

> > Much thanks to all for any help provided!!

> >     -Steve



Mon, 08 Dec 2003 09:49:07 GMT  
 Duplicating Tab page and controls therein
Have I told you lately that you rock?


Quote:
> What.... you actually want to be able to process the contents? ;)
Actually,
> the easiest way would be to do all or most of the processing in the form
> that contains the controls (Form2) but I modified the sample to allow you
to
> get at it from the parent form as well (attached) ,also got rid of the
> control arrays that were on Form2 that were left over from a different
> method of adding tabs/controls that turned out to be too much work for a
> quicky example..



> > Aha!  I knew I'd have a question or nine....I can't seem to figure out
how
> > to retrieve the contents of, say, the Text1 textbox on the newly created
> > second panel - a check of form2.text1.ubound shows that only one
exists...

> > Just this one more question and I promise, that'll be all until the next
> > one!!  ;-)

> > Thanks,

> >     Stev



> > > Try the attached. The way this one's set up, the controls that are to
be
> > > displayed on each tab are on a seperate form and I'm using SetParent
to
> > show
> > > it on a tab.. Code's in place to add tabs and forms by clicking a
> button..
> > > give it a shot..



> > > > Hello all!

> > > > I'm upgrading my app (short version - reads a text file containing
> > camera
> > > > data and populates various listboxes, checkboxes, and text fields
> based
> > on
> > > > data therein) to allow an arbitrary number of cameras to be
accounted
> > for.

> > > > My plan is to use a Tab control (ssTab at this moment), and add a
page
> > for
> > > > each camera found.

> > > > My question is this - how does one "copy" a tab page, or generate
> copies
> > > of
> > > > every control on that page, pasting them into the new page in the
> right
> > > > places and all that fun?  Am I *REALLY* looking at a big pile of
code
> > > here?

> > > > Much thanks to all for any help provided!!

> > > >     -Steve



Tue, 09 Dec 2003 02:17:17 GMT  
 Duplicating Tab page and controls therein
Thanks... Mostly late 60's early 70's rock though.. very little "new
music"... the term "music" has been stretched to a breaking point. Who the
heck came up with rap anyway? poems with ultra repetitive background noise
is more like it.. no wonder {*filter*}ers kill each other... the music drives
them insane!


Quote:
> Have I told you lately that you rock?



> > What.... you actually want to be able to process the contents? ;)
> Actually,
> > the easiest way would be to do all or most of the processing in the form
> > that contains the controls (Form2) but I modified the sample to allow
you
> to
> > get at it from the parent form as well (attached) ,also got rid of the
> > control arrays that were on Form2 that were left over from a different
> > method of adding tabs/controls that turned out to be too much work for a
> > quicky example..



> > > Aha!  I knew I'd have a question or nine....I can't seem to figure out
> how
> > > to retrieve the contents of, say, the Text1 textbox on the newly
created
> > > second panel - a check of form2.text1.ubound shows that only one
> exists...

> > > Just this one more question and I promise, that'll be all until the
next
> > > one!!  ;-)

> > > Thanks,

> > >     Stev



> > > > Try the attached. The way this one's set up, the controls that are
to
> be
> > > > displayed on each tab are on a seperate form and I'm using SetParent
> to
> > > show
> > > > it on a tab.. Code's in place to add tabs and forms by clicking a
> > button..
> > > > give it a shot..



> > > > > Hello all!

> > > > > I'm upgrading my app (short version - reads a text file containing
> > > camera
> > > > > data and populates various listboxes, checkboxes, and text fields
> > based
> > > on
> > > > > data therein) to allow an arbitrary number of cameras to be
> accounted
> > > for.

> > > > > My plan is to use a Tab control (ssTab at this moment), and add a
> page
> > > for
> > > > > each camera found.

> > > > > My question is this - how does one "copy" a tab page, or generate
> > copies
> > > > of
> > > > > every control on that page, pasting them into the new page in the
> > right
> > > > > places and all that fun?  Am I *REALLY* looking at a big pile of
> code
> > > > here?

> > > > > Much thanks to all for any help provided!!

> > > > >     -Steve



Tue, 09 Dec 2003 03:18:20 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Masked Edit COM control appears only on first tab page of tab control in VB.NET

2. How to select Tab Control tab page programmatically?

3. Duplicating controls inside multiple tabs

4. Putting a treeview control on a Tab control page

5. changing color of tab header of tab pages

6. Prevent multiline tabs from moving up and down on a tab page

7. tab bars do not match tab page

8. reference active page in tab control

9. Which page is active in a Tab control?

10. Tab Control on multi-page form

11. Tab Control Page Setting in VBA

12. Eureka - Get the current active page in a tab control

 

 
Powered by phpBB® Forum Software