mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-11 00:28:18 +02:00
LCL: switch height and width if orientation of trackbar changes (bug #1787)
git-svn-id: trunk@10431 -
This commit is contained in:
parent
b8104ed672
commit
1eda95efaa
@ -112,14 +112,22 @@ end;
|
||||
Change the orientation of the trackbar.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TCustomTrackBar.SetOrientation(Value: TTrackBarOrientation);
|
||||
var
|
||||
OldWidth: LongInt;
|
||||
OldHeight: LongInt;
|
||||
begin
|
||||
if FOrientation <> Value then
|
||||
begin
|
||||
FOrientation := Value;
|
||||
if HandleAllocated then
|
||||
begin
|
||||
// switch width and height, but not when loading, because we assume that the
|
||||
// lfm contains a consistent combination of Orientation and (width, height)
|
||||
if not (csLoading in ComponentState) then begin
|
||||
OldWidth:=Width;
|
||||
OldHeight:=Height;
|
||||
SetBounds(Left,Top,OldHeight,OldWidth);
|
||||
// TODO: Remove RecreateWnd
|
||||
RecreateWnd(Self);
|
||||
if HandleAllocated then
|
||||
RecreateWnd(Self);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
@ -1749,9 +1749,9 @@ begin
|
||||
Show := WParam <> 0;
|
||||
Status := LParam;
|
||||
End;
|
||||
|
||||
if assigned(lWinControl) and ((WParam<>0) or not lWinControl.Visible)
|
||||
and ((WParam=0) or lWinControl.Visible)
|
||||
//DebugLn(GetStackTrace(false));
|
||||
if assigned(lWinControl) {and ((WParam<>0) or not lWinControl.Visible)
|
||||
and ((WParam=0) or lWinControl.Visible)}
|
||||
and (Application<>nil) and (lWinControl=Application.MainForm) then
|
||||
begin
|
||||
if WParam=0 then
|
||||
|
Loading…
Reference in New Issue
Block a user