Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding tabs on a pagecontrol 1

Status
Not open for further replies.

Stretchwickster

Programmer
Apr 30, 2001
1,746
GB
Hi,

I'm trying to create a wizard-style application and want to hide the tabs but show the pages of a pagecontrol so that the user can only navigate thru the pages using 'Next' and 'Back' buttons.

I've tried using the TPageControl.TabVisible property but this prevents correct functionality of the TPageControl.SelectNextPage property.

Anyone got any ideas how I can advance thru the pages using the buttons, while the tabs are kept hidden. By the way, the TPageControl.ActivePage property seems to be affected by TabVisible too!

Any help would be much appreciated

Clive
 
What about:

procedure TForm1.FormShow(Sender: TObject);
begin
idx := 0;
pagecontrol1.activepage := pagecontrol1.Pages[idx];
end;

procedure TForm1.NEXTClick(Sender: TObject);
begin
if idx = pagecontrol1.PageCount-1 then EXIT;
inc(idx);
pagecontrol1.activepage := pagecontrol1.Pages[idx];
end;

procedure TForm1.PREVClick(Sender: TObject);
begin
if idx = 0 then EXIT;
dec(idx);
pagecontrol1.activepage := pagecontrol1.Pages[idx];
end;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top