mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 10:20:19 +02:00
fix TPageControl.OnChanging event (issue #1984)
git-svn-id: trunk@9632 -
This commit is contained in:
parent
67458062b3
commit
cfd72aa2fb
@ -221,7 +221,6 @@ type
|
||||
|
||||
TPageControl = class(TCustomNotebook)
|
||||
private
|
||||
FOnChanging: TTabChangingEvent;
|
||||
function GetActivePageIndex: Integer;
|
||||
function GetActiveTabSheet: TTabSheet;
|
||||
function GetTabIndex: Integer;
|
||||
@ -271,7 +270,7 @@ type
|
||||
//property TabWidth;
|
||||
property Visible;
|
||||
property OnChange: TNotifyEvent read fOnPageChanged write fOnPageChanged;
|
||||
property OnChanging: TTabChangingEvent read FOnChanging write FOnChanging;
|
||||
property OnChanging;
|
||||
property OnContextPopup;
|
||||
//property OnDockDrop;
|
||||
//property OnDockOver;
|
||||
|
@ -2338,12 +2338,13 @@ function DoControlMsg(Handle: hwnd; var Message): Boolean;
|
||||
var
|
||||
AWinControl: TWinControl;
|
||||
begin
|
||||
Result := False;
|
||||
Result := false;
|
||||
AWinControl := FindOwnerControl(Handle);
|
||||
if AWinControl <> nil then begin
|
||||
if AWinControl <> nil then
|
||||
begin
|
||||
with TLMessage(Message) do
|
||||
AWinControl.Perform(Msg + CN_BASE, WParam, LParam);
|
||||
Result:= True;
|
||||
Result := AWinControl.Perform(Msg + CN_BASE, WParam, LParam);
|
||||
Result := true;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
@ -1022,8 +1022,8 @@ begin
|
||||
Message.WParam := WParam;
|
||||
Message.LParam := LParam;
|
||||
Message.Result := 0;
|
||||
If Self <> nil then WindowProc(Message);
|
||||
Result := Message.Result;
|
||||
if Self <> nil then WindowProc(Message);
|
||||
Result := Message.Result;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -1489,13 +1489,11 @@ Begin
|
||||
Msg := LM_NOTIFY;
|
||||
IDCtrl := WParam;
|
||||
NMHdr := PNMHDR(LParam);
|
||||
With NMHdr^ do
|
||||
case code of
|
||||
TCN_SELCHANGING:
|
||||
ShowHideTabPage(HWndFrom, False);
|
||||
TCN_SELCHANGE:
|
||||
idFrom := ShowHideTabPage(HWndFrom, true);
|
||||
end;
|
||||
with NMHdr^ do
|
||||
case code of
|
||||
TCN_SELCHANGE:
|
||||
idFrom := ShowHideTabPage(HWndFrom, true);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
@ -1864,6 +1862,16 @@ Begin
|
||||
WParam := LMKey.CharCode;
|
||||
end;
|
||||
|
||||
LM_NOTIFY:
|
||||
begin
|
||||
with LMNotify.NMHdr^ do
|
||||
case code of
|
||||
TCN_SELCHANGING:
|
||||
if LMNotify.Result = 0 then
|
||||
ShowHideTabPage(HWndFrom, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
else
|
||||
case Msg of
|
||||
WM_LBUTTONDOWN, WM_LBUTTONUP:
|
||||
|
Loading…
Reference in New Issue
Block a user