Tabpages on the fly?

B

Bob Landers

I get errors when I try to create tabpages on a tabcontrol on the fly. The
error says that I can only do this in design mode - and the access help
appears to confirm this.

Does anyone know of a workaround?


TIA
Bob
 
D

Douglas J. Steele

There's no workaround. Adding pages to a tab control is a design change, and
you must have the form open in Design mode to make design changes to it.

That having been said, it's seldom necessary to dynamically change forms.
Why do you feel you need to add the pages? Perhaps we can suggest an
alternative.
 
D

Douglas J. Steele

Okay, I see you explained what you're trying to do in another thread.

If you know the maximum number of folders with which you're going to be
dealing, create that many tab pages, and only make the necessary ones
visible.

If you don't know the maximum number, pick an arbitrary number to display,
and have the "last" tab indicate "more". When you click on the "more" tab,
refresh what the other tabs show.
 
B

Bob Landers

Hi Doug,

Thanks for the reply.

I was thinking that the create/hide tabs option would not be practical given
that I would not know exactly how many subfolders would be needed. Having
said that, your suggestion about labelling the last tab "more" seems to
emulate precisely the microsoft template picker approach. I like it.


Thanks
Bob
 
B

Bob Landers

Doug,

I forgot to ask, how do I get the tab control to show two rows of tabs?
When I right-click the control in when I have the form open (in pop-up/modal
mode), the properties options is dimmed. I have suspicion that there was an
option somewhere that allowed you to specify two rows of tabs, but can't
seem to locate it.


Regards
Bob
 
R

Rick Brandt

Bob said:
Doug,

I forgot to ask, how do I get the tab control to show two rows of
tabs? When I right-click the control in when I have the form open (in
pop-up/modal mode), the properties options is dimmed. I have
suspicion that there was an option somewhere that allowed you to
specify two rows of tabs, but can't seem to locate it.

On the format tab of the property sheet look for the "Multi Row" property.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top