IDE: install pakcage set dlg: fixed OnResize

git-svn-id: trunk@27495 -
This commit is contained in:
mattias 2010-09-27 22:02:59 +00:00
parent 22da3b4e6d
commit 6e9db710f1
3 changed files with 42 additions and 49 deletions

View File

@ -37,8 +37,8 @@ const CheckClientRectName = 'LCLInterfaceRadioGroup';
{off $DEFINE VerboseSizeMsg} {off $DEFINE VerboseSizeMsg}
{off $DEFINE CHECK_POSITION} {off $DEFINE CHECK_POSITION}
{$IFDEF CHECK_POSITION} {$IFDEF CHECK_POSITION}
const CheckPostionClassName = 'xxTPage'; const CheckPostionClassName = 'BtnPanel';
const CheckPostionName = 'Button2'; const CheckPostionName = 'xxButton2';
const CheckPostionParentName = 'xxxEnvVarsPage'; const CheckPostionParentName = 'xxxEnvVarsPage';
function CheckPosition(AControl: TControl): boolean; function CheckPosition(AControl: TControl): boolean;

View File

@ -19,20 +19,20 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
AnchorSideTop.Side = asrBottom AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = PkgInfoGroupBox AnchorSideBottom.Control = PkgInfoGroupBox
Left = 6 Left = 6
Height = 269 Height = 267
Top = 30 Top = 30
Width = 255 Width = 255
Anchors = [akTop, akLeft, akBottom] Anchors = [akTop, akLeft, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'InstallPkgGroupBox' Caption = 'InstallPkgGroupBox'
ClientHeight = 250 ClientHeight = 246
ClientWidth = 251 ClientWidth = 247
TabOrder = 0 TabOrder = 0
object ImportButton: TButton object ImportButton: TButton
Left = 6 Left = 6
Height = 25 Height = 25
Top = 188 Top = 184
Width = 239 Width = 235
Align = alBottom Align = alBottom
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'ImportButton' Caption = 'ImportButton'
@ -42,8 +42,8 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
object ExportButton: TButton object ExportButton: TButton
Left = 6 Left = 6
Height = 25 Height = 25
Top = 219 Top = 215
Width = 239 Width = 235
Align = alBottom Align = alBottom
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'ExportButton' Caption = 'ExportButton'
@ -52,9 +52,9 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
end end
object InstallTreeView: TTreeView object InstallTreeView: TTreeView
Left = 6 Left = 6
Height = 145 Height = 141
Top = 6 Top = 6
Width = 239 Width = 235
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
DefaultItemHeight = 19 DefaultItemHeight = 19
@ -70,8 +70,8 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
object UninstallButton: TBitBtn object UninstallButton: TBitBtn
Left = 6 Left = 6
Height = 25 Height = 25
Top = 157 Top = 153
Width = 239 Width = 235
Align = alBottom Align = alBottom
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'UninstallButton' Caption = 'UninstallButton'
@ -86,20 +86,20 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
AnchorSideRight.Side = asrBottom AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = PkgInfoGroupBox AnchorSideBottom.Control = PkgInfoGroupBox
Left = 267 Left = 267
Height = 269 Height = 267
Top = 30 Top = 30
Width = 299 Width = 299
Anchors = [akTop, akLeft, akRight, akBottom] Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'AvailablePkgGroupBox' Caption = 'AvailablePkgGroupBox'
ClientHeight = 250 ClientHeight = 246
ClientWidth = 295 ClientWidth = 291
TabOrder = 1 TabOrder = 1
object AvailableTreeView: TTreeView object AvailableTreeView: TTreeView
Left = 6 Left = 6
Height = 207 Height = 203
Top = 6 Top = 6
Width = 283 Width = 279
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
DefaultItemHeight = 19 DefaultItemHeight = 19
@ -115,8 +115,8 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
object AddToInstallButton: TBitBtn object AddToInstallButton: TBitBtn
Left = 6 Left = 6
Height = 25 Height = 25
Top = 219 Top = 215
Width = 283 Width = 279
Align = alBottom Align = alBottom
BorderSpacing.Around = 6 BorderSpacing.Around = 6
Caption = 'AddToInstallButton' Caption = 'AddToInstallButton'
@ -128,18 +128,18 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
AnchorSideBottom.Control = HelpButton AnchorSideBottom.Control = HelpButton
Left = 0 Left = 0
Height = 93 Height = 93
Top = 305 Top = 303
Width = 572 Width = 572
Align = alBottom Align = alBottom
Caption = 'PkgInfoGroupBox' Caption = 'PkgInfoGroupBox'
ClientHeight = 74 ClientHeight = 72
ClientWidth = 568 ClientWidth = 564
TabOrder = 2 TabOrder = 2
object PkgInfoMemo: TMemo object PkgInfoMemo: TMemo
Left = 6 Left = 6
Height = 62 Height = 60
Top = 6 Top = 6
Width = 556 Width = 552
Align = alClient Align = alClient
BorderSpacing.Around = 6 BorderSpacing.Around = 6
ReadOnly = True ReadOnly = True
@ -149,21 +149,20 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
end end
object BtnPanel: TPanel object BtnPanel: TPanel
Left = 0 Left = 0
Height = 44 Height = 46
Top = 398 Top = 396
Width = 572 Width = 572
Align = alBottom Align = alBottom
AutoSize = True AutoSize = True
BevelOuter = bvNone BevelOuter = bvNone
ClientHeight = 44 ClientHeight = 46
ClientWidth = 572 ClientWidth = 572
TabOrder = 3 TabOrder = 3
object HelpButton: TBitBtn object HelpButton: TBitBtn
AnchorSideBottom.Side = asrBottom
Left = 6 Left = 6
Height = 32 Height = 34
Top = 6 Top = 6
Width = 75 Width = 85
Align = alLeft Align = alLeft
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -175,12 +174,10 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
TabOrder = 0 TabOrder = 0
end end
object CancelButton: TBitBtn object CancelButton: TBitBtn
AnchorSideRight.Side = asrBottom Left = 119
AnchorSideBottom.Side = asrBottom Height = 34
Left = 140
Height = 32
Top = 6 Top = 6
Width = 79 Width = 86
Align = alRight Align = alRight
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -193,11 +190,10 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
TabOrder = 1 TabOrder = 1
end end
object SaveAndExitButton: TBitBtn object SaveAndExitButton: TBitBtn
AnchorSideBottom.Side = asrBottom Left = 403
Left = 410 Height = 34
Height = 32
Top = 6 Top = 6
Width = 156 Width = 163
Align = alRight Align = alRight
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6
@ -244,11 +240,10 @@ object InstallPkgSetDialog: TInstallPkgSetDialog
TabOrder = 2 TabOrder = 2
end end
object SaveAndRebuildButton: TBitBtn object SaveAndRebuildButton: TBitBtn
AnchorSideBottom.Side = asrBottom Left = 211
Left = 225 Height = 34
Height = 32
Top = 6 Top = 6
Width = 179 Width = 186
Align = alRight Align = alRight
AutoSize = True AutoSize = True
BorderSpacing.Around = 6 BorderSpacing.Around = 6

View File

@ -277,12 +277,10 @@ end;
procedure TInstallPkgSetDialog.InstallPkgSetDialogResize(Sender: TObject); procedure TInstallPkgSetDialog.InstallPkgSetDialogResize(Sender: TObject);
var var
w: Integer; w: Integer;
x: Integer;
begin begin
x := 6; w:=ClientWidth div 2-InstallPkgGroupBox.BorderSpacing.Left*3;
w := (ClientWidth - 3 * x) div 2; if w<1 then w:=1;
InstallPkgGroupBox.SetBounds(x, x, w, Height - 150); InstallPkgGroupBox.Width:=w;
AvailablePkgGroupBox.SetBounds(2 * x + w, x, w, Height - 150);
end; end;
procedure TInstallPkgSetDialog.InstallTreeViewSelectionChanged(Sender: TObject); procedure TInstallPkgSetDialog.InstallTreeViewSelectionChanged(Sender: TObject);