Board index » delphi » PageControl: hide the tabs?

PageControl: hide the tabs?

Is it possible to hide the tabs on a TPageControl? I'm trying to create a
"wizard", so i'd like to use the TPageControl to hold the different pages.
However, I want to control which page they go to, so I only want to have
"next" and "back" buttons, not the tabs.

Alternately, is there a better way to implement a "wizard"?

Regards,
Dave Lehman
(daveleh...@loewen.com)

 

Re:PageControl: hide the tabs?


Quote
On Wed, 04 Nov 1998 20:23:46 GMT, some...@somewhere.coma (DAve) wrote:
>Is it possible to hide the tabs on a TPageControl?

Yes. See TabVisible.

Quote
> I'm trying to create a
>"wizard", so i'd like to use the TPageControl to hold the different pages.
>However, I want to control which page they go to, so I only want to have
>"next" and "back" buttons, not the tabs.

>Alternately, is there a better way to implement a "wizard"?

I prefer using the 'obsolete' Notebook component (Win3.1 palette
page).

hth
David

Quote
>Regards,
>Dave Lehman
>(daveleh...@loewen.com)

------------------
David A. Schweizer

iec ProGAMMA, The Netherlands
d.a.schweizer[OK, i don't want any more spam]gamma.rug.nl
guess where the '@' goes ?

Re:PageControl: hide the tabs?


In article <mJ202.1232$FQ3.1...@typhoon.mbnet.mb.ca>, some...@somewhere.coma

Quote
(DAve) writes:
>Is it possible to hide the tabs on a TPageControl? I'm trying to create a
>"wizard", so i'd like to use the TPageControl to hold the different pages.
>However, I want to control which page they go to, so I only want to have
>"next" and "back" buttons, not the tabs.

Set the TabVisible property of _all_ the individual TabSheets to false.

Either individually in the Object Inspector or in code as :-

  with PageControl1 do
    for i := 0 to ControlCount - 1 do
      if (Controls[i] is TTabSheet) then
        TTabSheet(Controls[i]).TabVisible := false;

Quote
>Alternately, is there a better way to implement a "wizard"?

"better" - don't know, but another way :-

Use a TNotebook with align set to alClient and control the notebook pages from
the Back / Next / Cancel buttons.

Or use a TTabControl set to alTop with three tabs (Back, Next, Cancel) with
TabWidth set to Form.Width div 3 (or something like that). Then have a
TNotebook with the Align set to alClient to cover the remainder of the form.
Control the TNotebook pages from the TTabControl selections.

Alan Lloyd
alangll...@aol.com

Other Threads