Tools/LazDatadesktop: Improved layout

This commit is contained in:
wp_xyz 2023-07-24 00:52:21 +02:00
parent fe3b5ca955
commit 7c6659ba46
6 changed files with 368 additions and 339 deletions

View File

@ -1,21 +1,22 @@
object GenerateSQLForm: TGenerateSQLForm
Left = 364
Height = 395
Height = 423
Top = 295
Width = 812
ActiveControl = PCSQL
Caption = 'Generate SQL statements'
ClientHeight = 395
ClientHeight = 423
ClientWidth = 812
OnCreate = FormCreate
LCLVersion = '2.1.0.0'
LCLVersion = '3.99.0.0'
object PCSQL: TPageControl
Left = 0
Height = 359
Top = 0
Width = 812
Left = 6
Height = 371
Top = 6
Width = 800
ActivePage = TSFields
Align = alClient
BorderSpacing.Around = 6
TabIndex = 0
TabOrder = 0
object TSFields: TTabSheet
@ -25,17 +26,17 @@ object GenerateSQLForm: TGenerateSQLForm
ChildSizing.ShrinkHorizontal = crsScaleChilds
ChildSizing.ShrinkVertical = crsScaleChilds
ChildSizing.ControlsPerLine = 3
ClientHeight = 328
ClientWidth = 802
ClientHeight = 343
ClientWidth = 792
OnResize = TSResize
object POptions: TPanel
Left = 0
Height = 328
Height = 343
Top = 0
Width = 254
Align = alLeft
BevelOuter = bvNone
ClientHeight = 328
ClientHeight = 343
ClientWidth = 254
Constraints.MinWidth = 180
TabOrder = 0
@ -76,11 +77,11 @@ object GenerateSQLForm: TGenerateSQLForm
end
object CBTables: TComboBox
Left = 4
Height = 31
Height = 23
Top = 26
Width = 238
Anchors = [akTop, akLeft, akRight]
ItemHeight = 0
ItemHeight = 15
OnChange = CBTablesChange
Sorted = True
Style = csDropDownList
@ -89,18 +90,17 @@ object GenerateSQLForm: TGenerateSQLForm
object BGenerate: TButton
Left = 4
Height = 25
Top = 299
Top = 314
Width = 238
Anchors = [akLeft, akRight, akBottom]
BorderSpacing.InnerBorder = 4
Caption = '&Generate SQL'
Default = True
OnClick = BGenerateClick
TabOrder = 1
end
object SEindent: TTISpinEdit
Left = 184
Height = 29
Height = 23
Top = 216
Width = 56
Anchors = [akTop, akRight]
@ -109,7 +109,7 @@ object GenerateSQLForm: TGenerateSQLForm
end
object SELineLength: TTISpinEdit
Left = 184
Height = 29
Height = 23
Top = 245
Width = 56
Anchors = [akTop, akRight]
@ -135,9 +135,9 @@ object GenerateSQLForm: TGenerateSQLForm
end
object CBIgnoreSelection: TCheckBox
Left = 4
Height = 23
Height = 19
Top = 272
Width = 189
Width = 171
Caption = 'Create full table creation SQL'
TabOrder = 5
end
@ -147,19 +147,19 @@ object GenerateSQLForm: TGenerateSQLForm
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = PSelectFields
Left = 254
Height = 328
Height = 343
Top = 0
Width = 260
Width = 250
Align = alClient
BevelOuter = bvNone
ClientHeight = 328
ClientWidth = 260
ClientHeight = 343
ClientWidth = 250
TabOrder = 1
object LLBKeyFields: TLabel
Left = 0
Height = 26
Top = 0
Width = 260
Width = 250
Align = alTop
Alignment = taCenter
AutoSize = False
@ -169,26 +169,25 @@ object GenerateSQLForm: TGenerateSQLForm
end
object LBKeyFields: TListBox
Left = 2
Height = 283
Height = 298
Top = 34
Width = 254
Width = 244
Anchors = [akTop, akLeft, akRight, akBottom]
ItemHeight = 0
MultiSelect = True
ScrollWidth = 252
Sorted = True
TabOrder = 0
TopIndex = -1
end
end
object PSelectFields: TPanel
Left = 514
Height = 328
Left = 504
Height = 343
Top = 0
Width = 288
Align = alRight
BevelOuter = bvNone
ClientHeight = 328
ClientHeight = 343
ClientWidth = 288
TabOrder = 2
object Label2: TLabel
@ -205,7 +204,7 @@ object GenerateSQLForm: TGenerateSQLForm
end
object LBFields: TListBox
Left = 12
Height = 283
Height = 298
Top = 34
Width = 266
Anchors = [akTop, akLeft, akRight, akBottom]
@ -214,19 +213,18 @@ object GenerateSQLForm: TGenerateSQLForm
ScrollWidth = 264
Sorted = True
TabOrder = 0
TopIndex = -1
end
end
end
object TSSelect: TTabSheet
Caption = '&Select'
ClientHeight = 328
ClientWidth = 802
ClientHeight = 343
ClientWidth = 792
object MSelect: TMemo
Left = 8
Height = 317
Height = 327
Top = 8
Width = 788
Width = 776
Align = alClient
BorderSpacing.Around = 8
Lines.Strings = (
@ -237,13 +235,13 @@ object GenerateSQLForm: TGenerateSQLForm
end
object TSInsert: TTabSheet
Caption = '&Insert'
ClientHeight = 328
ClientWidth = 802
ClientHeight = 343
ClientWidth = 792
object MInsert: TMemo
Left = 8
Height = 317
Height = 327
Top = 8
Width = 788
Width = 776
Align = alClient
BorderSpacing.Around = 8
Lines.Strings = (
@ -254,13 +252,13 @@ object GenerateSQLForm: TGenerateSQLForm
end
object TSUpdate: TTabSheet
Caption = '&Update'
ClientHeight = 328
ClientWidth = 802
ClientHeight = 343
ClientWidth = 792
object MUpdate: TMemo
Left = 8
Height = 317
Height = 327
Top = 8
Width = 788
Width = 776
Align = alClient
BorderSpacing.Around = 8
Lines.Strings = (
@ -271,13 +269,13 @@ object GenerateSQLForm: TGenerateSQLForm
end
object TSDelete: TTabSheet
Caption = '&Delete'
ClientHeight = 328
ClientWidth = 802
ClientHeight = 343
ClientWidth = 792
object MDelete: TMemo
Left = 8
Height = 317
Height = 327
Top = 8
Width = 788
Width = 776
Align = alClient
BorderSpacing.Around = 8
Lines.Strings = (
@ -288,13 +286,13 @@ object GenerateSQLForm: TGenerateSQLForm
end
object TSCreate: TTabSheet
Caption = 'Create table'
ClientHeight = 328
ClientWidth = 802
ClientHeight = 343
ClientWidth = 792
object MCreate: TMemo
Left = 8
Height = 317
Height = 327
Top = 8
Width = 788
Width = 776
Align = alClient
BorderSpacing.Around = 8
Lines.Strings = (
@ -304,38 +302,20 @@ object GenerateSQLForm: TGenerateSQLForm
end
end
end
object PButtons: TPanel
Left = 0
Height = 36
Top = 359
Width = 812
Align = alBottom
BevelOuter = bvLowered
ClientHeight = 36
ClientWidth = 812
object ButtonPanel: TButtonPanel
Left = 6
Height = 34
Top = 383
Width = 800
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
HelpButton.DefaultCaption = True
CloseButton.Name = 'CloseButton'
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 1
object BOK: TButton
Left = 722
Height = 25
Top = 6
Width = 83
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
Caption = '&Ok'
ModalResult = 1
TabOrder = 0
end
object BCancel: TButton
Left = 634
Height = 25
Top = 6
Width = 83
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
Cancel = True
Caption = '&Cancel'
ModalResult = 2
TabOrder = 1
end
ShowButtons = [pbOK, pbCancel]
end
end

View File

@ -26,16 +26,16 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, ComCtrls,
ExtCtrls, Buttons, StdCtrls, {Spin,} RTTICtrls, fpdatadict, lazdatadeskstr;
ExtCtrls, Buttons, StdCtrls, ButtonPanel, RTTICtrls, fpdatadict,
lazdatadeskstr;
type
{ TGenerateSQLForm }
TGenerateSQLForm = class(TForm)
BOK: TButton;
BCancel: TButton;
BGenerate: TButton;
ButtonPanel: TButtonPanel;
CBTables: TComboBox;
CBIgnoreSelection: TCheckBox;
LBKeyFields: TListBox;
@ -54,7 +54,6 @@ type
POptions: TPanel;
PSelectFields: TPanel;
PCSQL: TPageControl;
PButtons: TPanel;
SELineLength: TTISpinEdit;
SEIndent: TTISpinEdit;
CLBOptions: TTICheckGroup;
@ -204,7 +203,7 @@ begin
MDelete.Clear;
MCreate.Clear;
FSQLGenerated:=False;
BOK.Default:=False;
ButtonPanel.OKButton.Default:=False;
BGenerate.Default:=True;
end;
@ -256,7 +255,7 @@ begin
end;
FSQLGenerated:=True;
BGenerate.Default:=False;
BOK.Default:=True;
ButtonPanel.OKButton.Default:=True;
PCSQL.ActivePage:=TSSelect;
finally
FL.Free;
@ -327,8 +326,8 @@ begin
LSELineLength.Caption:= sld_Linelength;
CBIgnoreSelection.Caption:= sld_Createfulltablecreationsql;
BGenerate.Caption:= sld_Generatesql;
BCancel.Caption:= sld_Cancel;
BOK.Caption:= sld_Ok;
ButtonPanel.CancelButton.Caption:= sld_Cancel;
ButtonPanel.OKButton.Caption:= sld_Ok;
CLBOptions.Link.AliasValues.Values['eoLineFeedAfterField'] := eoLineFeedAfterField;
CLBOptions.Link.AliasValues.Values['eoUseOldInWhereParams'] := eoUseOldInWhereParams;

View File

@ -9,73 +9,100 @@ object ImportDDform: TImportDDform
ClientWidth = 508
OnCreate = FormCreate
OnShow = FormShow
LCLVersion = '0.9.27'
LCLVersion = '3.99.0.0'
object LBItems: TCheckListBox
Left = 8
Height = 324
Top = 8
Width = 387
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = Owner
AnchorSideRight.Control = Panel1
AnchorSideBottom.Control = CBUpdateExisting
Left = 6
Height = 334
Top = 6
Width = 403
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
ItemHeight = 0
TabOrder = 0
end
object BOK: TButton
Left = 403
Height = 25
Top = 338
Width = 98
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
Caption = '&OK'
Default = True
ModalResult = 1
TabOrder = 1
end
object BCancel: TButton
Left = 403
Height = 25
Top = 307
Width = 101
Anchors = [akRight, akBottom]
BorderSpacing.InnerBorder = 4
Cancel = True
Caption = '&Cancel'
ModalResult = 2
TabOrder = 2
end
object BSelectNone: TButton
Left = 403
Height = 25
Top = 40
Width = 98
Action = ASelectNone
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
TabOrder = 3
end
object BSelectAll: TButton
Left = 403
Height = 25
Top = 8
Width = 98
Action = ASelectAll
Anchors = [akTop, akRight]
BorderSpacing.InnerBorder = 4
TabOrder = 4
end
object CBUpdateExisting: TCheckBox
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 8
Height = 21
Top = 338
Width = 155
Height = 19
Top = 346
Width = 134
Anchors = [akLeft, akBottom]
BorderSpacing.Bottom = 4
BorderSpacing.Around = 6
Caption = 'Update existing tables'
Checked = True
State = cbChecked
TabOrder = 5
TabOrder = 1
end
object Panel1: TPanel
Left = 409
Height = 375
Top = 0
Width = 99
Align = alRight
AutoSize = True
BevelOuter = bvNone
ClientHeight = 375
ClientWidth = 99
TabOrder = 2
object BOK: TButton
Left = 6
Height = 25
Top = 344
Width = 87
Align = alBottom
AutoSize = True
BorderSpacing.Around = 6
Caption = '&OK'
Default = True
ModalResult = 1
TabOrder = 3
end
object BCancel: TButton
Left = 6
Height = 25
Top = 313
Width = 87
Align = alBottom
AutoSize = True
BorderSpacing.Around = 6
Cancel = True
Caption = '&Cancel'
ModalResult = 2
TabOrder = 2
end
object BSelectNone: TButton
Left = 6
Height = 25
Top = 37
Width = 87
Action = ASelectNone
Align = alTop
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 1
end
object BSelectAll: TButton
Left = 6
Height = 25
Top = 6
Width = 87
Action = ASelectAll
Align = alTop
AutoSize = True
BorderSpacing.Around = 6
TabOrder = 0
end
end
object ActionList1: TActionList
left = 440
top = 120
Left = 264
Top = 128
object ASelectNone: TAction
Caption = 'Select &none'
OnExecute = DoSelection

View File

@ -26,7 +26,7 @@ interface
uses
Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, CheckLst,
Buttons, ActnList,fpdatadict, StdCtrls, lazdatadeskstr;
Buttons, ActnList,fpdatadict, StdCtrls, ExtCtrls, lazdatadeskstr;
type
@ -42,6 +42,7 @@ type
BSelectAll: TButton;
CBUpdateExisting: TCheckBox;
LBItems: TCheckListBox;
Panel1: TPanel;
procedure DoSelection(Sender: TObject);
procedure FormCreate(Sender: TObject);
procedure FormShow(Sender: TObject);

View File

@ -1,180 +1,26 @@
object SQLConnectionForm: TSQLConnectionForm
Left = 394
Height = 167
Height = 209
Top = 397
Width = 576
ActiveControl = EHostName
AutoSize = True
BorderIcons = [biSystemMenu]
Caption = 'Connect to a database'
ClientHeight = 167
ClientHeight = 209
ClientWidth = 576
Constraints.MinWidth = 470
Constraints.MinWidth = 480
OnActivate = FormActivate
OnCreate = FormCreate
Position = poMainFormCenter
LCLVersion = '3.99.0.0'
object LEHostName: TLabel
AnchorSideLeft.Control = Owner
AnchorSideTop.Control = EHostName
AnchorSideTop.Side = asrCenter
Left = 6
Height = 23
Top = 6
Width = 122
Alignment = taRightJustify
AutoSize = False
BorderSpacing.Left = 6
Caption = '&Host'
FocusControl = EHostName
Layout = tlCenter
ParentColor = False
end
object LEDatabaseName: TLabel
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = EDatabaseName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 6
Height = 23
Top = 35
Width = 122
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
AutoSize = False
Caption = '&Database'
FocusControl = EDatabaseName
Layout = tlCenter
ParentColor = False
end
object LEUserName: TLabel
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = EUserName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 6
Height = 23
Top = 64
Width = 122
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
AutoSize = False
Caption = '&Username'
FocusControl = EUserName
Layout = tlCenter
ParentColor = False
end
object LEPassword: TLabel
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = EPassword
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 6
Height = 23
Top = 93
Width = 122
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
AutoSize = False
Caption = '&Password'
FocusControl = EPassword
Layout = tlCenter
ParentColor = False
end
object LCharset: TLabel
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = ECharset
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 6
Height = 21
Top = 123
Width = 122
Alignment = taRightJustify
Anchors = [akTop, akLeft, akRight]
AutoSize = False
Caption = '&Charset'
FocusControl = ECharset
Layout = tlCenter
ParentColor = False
end
object EHostName: TEdit
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = Owner
AnchorSideRight.Control = BTest
Left = 134
Height = 23
Top = 6
Width = 294
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 0
end
object EDatabaseName: TEdit
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EHostName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BTest
Left = 134
Height = 23
Top = 35
Width = 294
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 1
end
object EUserName: TEdit
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EDatabaseName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BTest
Left = 134
Height = 23
Top = 64
Width = 294
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 2
end
object EPassword: TEdit
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EUserName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BTest
Left = 134
Height = 23
Top = 93
Width = 294
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
EchoMode = emPassword
PasswordChar = '*'
TabOrder = 3
end
object BPButtons: TButtonPanel
AnchorSideTop.Control = ECharset
AnchorSideTop.Side = asrBottom
AnchorSideBottom.Control = Owner
AnchorSideBottom.Side = asrBottom
Left = 6
Height = 10
Top = 151
Height = 34
Top = 169
Width = 564
Anchors = [akTop, akLeft, akRight]
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True
HelpButton.Name = 'HelpButton'
@ -183,37 +29,204 @@ object SQLConnectionForm: TSQLConnectionForm
CloseButton.DefaultCaption = True
CancelButton.Name = 'CancelButton'
CancelButton.DefaultCaption = True
TabOrder = 4
TabOrder = 1
ShowButtons = [pbOK, pbCancel]
end
object ECharset: TEdit
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EPassword
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BTest
AnchorSideBottom.Control = BPButtons
Left = 134
Height = 23
Top = 122
Width = 294
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 5
end
object BTest: TBitBtn
Left = 434
Height = 30
Top = 4
Width = 136
Anchors = [akTop, akRight]
Caption = 'Test connection'
Enabled = False
Images = ImgDatamodule.AppImages
ImageIndex = 38
OnClick = BTestClick
TabOrder = 6
object Panel1: TPanel
Left = 0
Height = 145
Top = 0
Width = 576
Align = alTop
AutoSize = True
BevelOuter = bvNone
Caption = '0'
ClientHeight = 145
ClientWidth = 576
TabOrder = 0
object LEHostName: TLabel
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EHostName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEUserName
AnchorSideRight.Side = asrBottom
Left = 98
Height = 15
Top = 10
Width = 25
Anchors = [akTop, akRight]
BorderSpacing.Left = 6
Caption = '&Host'
FocusControl = EHostName
Layout = tlCenter
ParentColor = False
end
object LEDatabaseName: TLabel
AnchorSideLeft.Control = LEHostName
AnchorSideTop.Control = EDatabaseName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEUserName
AnchorSideRight.Side = asrBottom
Left = 75
Height = 15
Top = 39
Width = 48
Anchors = [akTop, akRight]
Caption = '&Database'
FocusControl = EDatabaseName
Layout = tlCenter
ParentColor = False
end
object LEUserName: TLabel
AnchorSideLeft.Control = Panel1
AnchorSideTop.Control = EUserName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEHostName
AnchorSideRight.Side = asrBottom
Left = 70
Height = 15
Top = 68
Width = 53
BorderSpacing.Left = 70
Caption = '&Username'
FocusControl = EUserName
Layout = tlCenter
ParentColor = False
end
object LEPassword: TLabel
AnchorSideTop.Control = EPassword
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEUserName
AnchorSideRight.Side = asrBottom
Left = 73
Height = 15
Top = 97
Width = 50
Alignment = taRightJustify
Anchors = [akTop, akRight]
Caption = '&Password'
FocusControl = EPassword
Layout = tlCenter
ParentColor = False
end
object LCharset: TLabel
AnchorSideTop.Control = ECharset
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = LEUserName
AnchorSideRight.Side = asrBottom
Left = 83
Height = 15
Top = 126
Width = 40
Alignment = taRightJustify
Anchors = [akTop, akRight]
Caption = '&Charset'
FocusControl = ECharset
Layout = tlCenter
ParentColor = False
end
object EHostName: TEdit
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideRight.Control = BTest
Left = 129
Height = 23
Top = 6
Width = 305
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 0
end
object EDatabaseName: TEdit
AnchorSideLeft.Control = LEDatabaseName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EHostName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BTest
Left = 129
Height = 23
Top = 35
Width = 305
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 2
end
object EUserName: TEdit
AnchorSideLeft.Control = LEUserName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EDatabaseName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BTest
Left = 129
Height = 23
Top = 64
Width = 305
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 3
end
object EPassword: TEdit
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EUserName
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BTest
Left = 129
Height = 23
Top = 93
Width = 305
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
EchoMode = emPassword
PasswordChar = '*'
TabOrder = 4
end
object ECharset: TEdit
AnchorSideLeft.Control = LEHostName
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = EPassword
AnchorSideTop.Side = asrBottom
AnchorSideRight.Control = BTest
Left = 129
Height = 23
Top = 122
Width = 305
Anchors = [akTop, akLeft, akRight]
AutoSize = False
BorderSpacing.Left = 6
BorderSpacing.Top = 6
BorderSpacing.Right = 6
TabOrder = 5
end
object BTest: TBitBtn
AnchorSideTop.Control = EHostName
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = Panel1
AnchorSideRight.Side = asrBottom
Left = 440
Height = 26
Top = 4
Width = 130
Anchors = [akTop, akRight]
BorderSpacing.Right = 6
Caption = 'Test connection'
Enabled = False
Images = ImgDatamodule.AppImages
ImageIndex = 38
OnClick = BTestClick
TabOrder = 1
end
end
end

View File

@ -46,7 +46,9 @@ type
LEPassword: TLabel;
LEHostName: TLabel;
LEDatabaseName: TLabel;
Panel1: TPanel;
procedure BTestClick(Sender: TObject);
procedure FormActivate(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
FDriver : String;
@ -167,6 +169,13 @@ begin
TestConnection;
end;
procedure TSQLConnectionForm.FormActivate(Sender: TObject);
begin
ClientHeight := Panel1.Height + BPButtons.Height + 2*BPButtons.BorderSpacing.Around;
Constraints.MinHeight := Height;
Constraints.MaxHeight := Height;
end;
function TSQLConnectionForm.GetShowHost: Boolean;
begin
Result:=EHostName.Enabled;