That won't work when using the left/right arrow keys on the keyboard to
change the tab, which some people use.

Ross.

-- Original Message --

The following does it, I think there is a better way but cant
remember what it was.

//Stops selection of page 2
var
pt : TPoint;
begin
pt := ScreenToClient(Mouse.CursorPos);
if (PageControl.IndexOfTabAt(pt.X, pt.Y) = 2) then begin
AllowChange := False;
end;




---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to