(CodeLib-Manager)
Registriert seit: 10. Jun 2002
4.648 Beiträge
Delphi XE Professional
|
Re: JvNetscapeSplitter automatisieren
12. Mai 2006, 19:13
Zur Info (für andere) WMLButtonUp sieht so aus:
Delphi-Quellcode:
procedure TJvCustomNetscapeSplitter.WMLButtonUp(var Msg: TWMLButtonUp);
var
CurPos: TPoint;
OldMax: Boolean;
begin
inherited;
if FGotMouseDown then
begin
if ButtonHitTest(Msg.XPos, Msg.YPos) then
begin
CurPos := ClientToScreen(Point(Msg.XPos, Msg.YPos));
// More than a little movement is not a click, but a regular resize.
if ((Align in [alLeft, alRight]) and
(Abs(FDownPos.X - CurPos.X) <= MOVEMENT_TOLERANCE)) or
((Align in [alTop, alBottom]) and
(Abs(FDownPos.Y - CurPos.Y) <= MOVEMENT_TOLERANCE)) then
begin
StopSizing;
if ButtonStyle = bsNetscape then
Maximized := not Maximized
else
case WindowButtonHitTest(Msg.XPos, Msg.YPos) of
wbMin:
Minimized := not Minimized;
wbMax:
Maximized := not Maximized;
wbClose:
DoClose;
end;
end;
end;
FGotMouseDown := False;
end
else
if AllowDrag then
begin
FindControl;
if FControl = nil then
Exit;
OldMax := FMaximized;
case Align of
alLeft, alRight:
FMaximized := FControl.Width <= MinSize;
alTop, alBottom:
FMaximized := FControl.Height <= MinSize;
end;
if FMaximized then
begin
UpdateControlSize(MinSize);
if not OldMax then
DoMaximize;
end
else
begin
case Align of
alLeft, alRight:
FRestorePos := FControl.Width;
alTop, alBottom:
FRestorePos := FControl.Height;
end;
if OldMax then
DoRestore;
end;
end;
Invalidate;
end;
Thomas
|
|
Zitat
|