procedure TForm1.PageControl1Change(Sender: TObject);
begin
PageControl1.Pages[pageControl1.ActivePageIndex].Caption := 'www' ;
end;
其他的看你的了
begin
PageControl1.Pages[pageControl1.ActivePageIndex].Caption := 'www' ;
end;
其他的看你的了
在OnDrawTab事件中写代码处理。
TabIndex: Integer; const Rect: TRect; Active: Boolean);
begin
with TabControl1.Canvas do
begin
FillRect(Rect);
if Active then
begin
Font.Color := clRed;
Font.Style := [fsBold, fsItalic];
end else
begin
Font.Color := clBlack;
Font.Style := [];
end;
TextOut(Rect.Left + 6, Rect.Top + 4, TabControl1.Tabs[TabIndex]);
end;
end;
tabindex: integer; const rect: trect; active: boolean);
begin
with tabcontrol1.canvas do
begin
fillrect(rect);
if active then
begin
font.color := clred;//可选择
font.style := [fsbold, fsitalic];//可选择
end else
begin
font.color := clblack;//可选择
font.style := [];//可选择
end;
textout(rect.left + 4, rect.top +2, tabcontrol1.tabs[tabindex]);
end;
end;
还可在上面加图标的