PageControl 中 指定TabSheet 不可激活

procedure TForm1.PageControl1Changing(Sender: TObject;
  var AllowChange: Boolean);
var
  FPt: TPoint;
  FIndex: Integer;
begin
  if GetCursorPos(FPt) then
  begin
    FPt := PageControl1.ScreenToClient(FPt);
    FIndex := PageControl1.IndexOfTabAt(FPt.X, FPt.Y);
    AllowChange := FIndex in [0,1,2];
  end;

end;


你可能感兴趣的:(java)