You've already forked lazarus-ccr
tvplanit: Update ResourceEditForm to scale correctly in the HighDpi mode of Lazarus 1.8. Fix scaling of button panel in contacts and event editor forms.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5876 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1392,22 +1392,25 @@ object ContactEditForm: TContactEditForm
|
|||||||
ClientWidth = 506
|
ClientWidth = 506
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object OKBtn: TButton
|
object OKBtn: TButton
|
||||||
AnchorSideTop.Control = CancelBtn
|
AnchorSideTop.Control = pnlBottom
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = CancelBtn
|
AnchorSideRight.Control = CancelBtn
|
||||||
AnchorSideBottom.Control = CancelBtn
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 354
|
Left = 354
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 74
|
Width = 74
|
||||||
Anchors = [akTop, akRight, akBottom]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 8
|
BorderSpacing.Right = 8
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
Caption = 'OK'
|
Caption = 'OK'
|
||||||
Default = True
|
Default = True
|
||||||
OnClick = OKBtnClick
|
OnClick = OKBtnClick
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object CancelBtn: TButton
|
object CancelBtn: TButton
|
||||||
|
AnchorSideTop.Control = pnlBottom
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Control = pnlBottom
|
AnchorSideRight.Control = pnlBottom
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
|
@ -150,7 +150,7 @@ type
|
|||||||
FBtnHeight: Integer;
|
FBtnHeight: Integer;
|
||||||
FEditHeight: Integer;
|
FEditHeight: Integer;
|
||||||
procedure DisplayCurrentCountry(AddressType: TVpAddressType);
|
procedure DisplayCurrentCountry(AddressType: TVpAddressType);
|
||||||
procedure ResizeControls;
|
procedure PositionControls;
|
||||||
procedure SetCaptions;
|
procedure SetCaptions;
|
||||||
public
|
public
|
||||||
Resource: TVpResource;
|
Resource: TVpResource;
|
||||||
@ -468,7 +468,6 @@ begin
|
|||||||
|
|
||||||
DisplayCurrentCountry(atWork);
|
DisplayCurrentCountry(atWork);
|
||||||
DisplayCurrentCountry(atHome);
|
DisplayCurrentCountry(atHome);
|
||||||
ResizeControls;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TContactEditForm.ItemChanged(Sender: TObject);
|
procedure TContactEditForm.ItemChanged(Sender: TObject);
|
||||||
@ -502,7 +501,7 @@ begin
|
|||||||
PageControl.ActivePage := tabBaseData;
|
PageControl.ActivePage := tabBaseData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TContactEditForm.ResizeControls;
|
procedure TContactEditForm.PositionControls;
|
||||||
type
|
type
|
||||||
TLabelArray = array of TLabel;
|
TLabelArray = array of TLabel;
|
||||||
TComboboxArray = array of TCombobox;
|
TComboboxArray = array of TCombobox;
|
||||||
@ -510,7 +509,6 @@ type
|
|||||||
var
|
var
|
||||||
Labels: TLabelArray;
|
Labels: TLabelArray;
|
||||||
Comboboxes: TComboboxArray;
|
Comboboxes: TComboboxArray;
|
||||||
Edits: TEditArray;
|
|
||||||
largestLabelWidth: Integer;
|
largestLabelWidth: Integer;
|
||||||
i: Integer;
|
i: Integer;
|
||||||
OldFont: TFont;
|
OldFont: TFont;
|
||||||
@ -518,7 +516,6 @@ var
|
|||||||
vDist: Integer = 4; // Vertical distance between edits
|
vDist: Integer = 4; // Vertical distance between edits
|
||||||
hBorder: Integer = 8; // Horizontal distance between container border and label
|
hBorder: Integer = 8; // Horizontal distance between container border and label
|
||||||
vBorder: Integer = 8; // Vertical distance between container border and 1st control
|
vBorder: Integer = 8; // Vertical distance between container border and 1st control
|
||||||
w,h: Integer;
|
|
||||||
comboArrowWidth: Integer;
|
comboArrowWidth: Integer;
|
||||||
begin
|
begin
|
||||||
{----------------------------------------------------------------------------}
|
{----------------------------------------------------------------------------}
|
||||||
@ -734,8 +731,6 @@ begin
|
|||||||
stateComboLabel.Hide;
|
stateComboLabel.Hide;
|
||||||
stateCombo.Items.Clear;
|
stateCombo.Items.Clear;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
// ResizeControls;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TContactEditForm.cbCountryChange(Sender: TObject);
|
procedure TContactEditForm.cbCountryChange(Sender: TObject);
|
||||||
@ -749,7 +744,7 @@ begin
|
|||||||
cbStateH.Text := '';
|
cbStateH.Text := '';
|
||||||
DisplayCurrentCountry(atHome);
|
DisplayCurrentCountry(atHome);
|
||||||
end;
|
end;
|
||||||
ResizeControls;
|
PositionControls;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TContactEditForm.FormKeyDown(Sender: TObject; var Key: Word;
|
procedure TContactEditForm.FormKeyDown(Sender: TObject; var Key: Word;
|
||||||
@ -782,6 +777,7 @@ begin
|
|||||||
PageControl.ActivePage := tabBaseData;
|
PageControl.ActivePage := tabBaseData;
|
||||||
if PageControl.ActivePage = tabBaseData then
|
if PageControl.ActivePage = tabBaseData then
|
||||||
edLastName.SetFocus;
|
edLastName.SetFocus;
|
||||||
|
PositionControls;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,33 +2,40 @@ object ResEditForm: TResEditForm
|
|||||||
Left = 280
|
Left = 280
|
||||||
Height = 302
|
Height = 302
|
||||||
Top = 234
|
Top = 234
|
||||||
Width = 455
|
Width = 466
|
||||||
HorzScrollBar.Page = 399
|
HorzScrollBar.Page = 399
|
||||||
VertScrollBar.Page = 249
|
VertScrollBar.Page = 249
|
||||||
Caption = 'Resource Edit'
|
Caption = 'Resource Edit'
|
||||||
ClientHeight = 302
|
ClientHeight = 302
|
||||||
ClientWidth = 455
|
ClientWidth = 466
|
||||||
Constraints.MinHeight = 250
|
Constraints.MinHeight = 250
|
||||||
Constraints.MinWidth = 400
|
Constraints.MinWidth = 400
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
OnShow = FormShow
|
OnShow = FormShow
|
||||||
LCLVersion = '1.7'
|
LCLVersion = '1.9.0.0'
|
||||||
object pnlBottom: TPanel
|
object pnlBottom: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 41
|
Height = 33
|
||||||
Top = 261
|
Top = 269
|
||||||
Width = 455
|
Width = 466
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
|
AutoSize = True
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 41
|
ClientHeight = 33
|
||||||
ClientWidth = 455
|
ClientWidth = 466
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object OKBtn: TButton
|
object OKBtn: TButton
|
||||||
Left = 291
|
AnchorSideTop.Control = pnlBottom
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = CancelBtn
|
||||||
|
Left = 313
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 7
|
Top = 4
|
||||||
Width = 75
|
Width = 66
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Right = 4
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
Caption = 'OK'
|
Caption = 'OK'
|
||||||
Default = True
|
Default = True
|
||||||
OnClick = OKBtnClick
|
OnClick = OKBtnClick
|
||||||
@ -36,11 +43,18 @@ object ResEditForm: TResEditForm
|
|||||||
TabStop = False
|
TabStop = False
|
||||||
end
|
end
|
||||||
object CancelBtn: TButton
|
object CancelBtn: TButton
|
||||||
Left = 370
|
AnchorSideTop.Control = pnlBottom
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = pnlBottom
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 383
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 7
|
Top = 4
|
||||||
Width = 75
|
Width = 75
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
Cancel = True
|
Cancel = True
|
||||||
Caption = 'Cancel'
|
Caption = 'Cancel'
|
||||||
OnClick = CancelBtnClick
|
OnClick = CancelBtnClick
|
||||||
@ -50,9 +64,9 @@ object ResEditForm: TResEditForm
|
|||||||
end
|
end
|
||||||
object pgResource: TPageControl
|
object pgResource: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 261
|
Height = 269
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 455
|
Width = 466
|
||||||
TabStop = False
|
TabStop = False
|
||||||
ActivePage = tabResource
|
ActivePage = tabResource
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -60,31 +74,44 @@ object ResEditForm: TResEditForm
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object tabResource: TTabSheet
|
object tabResource: TTabSheet
|
||||||
Caption = 'Resource'
|
Caption = 'Resource'
|
||||||
ClientHeight = 233
|
ClientHeight = 241
|
||||||
ClientWidth = 447
|
ClientWidth = 458
|
||||||
object lblDescription: TLabel
|
object lblDescription: TLabel
|
||||||
|
AnchorSideLeft.Control = tabResource
|
||||||
|
AnchorSideTop.Control = DescriptionEdit
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 24
|
Top = 20
|
||||||
Width = 63
|
Width = 63
|
||||||
|
BorderSpacing.Left = 8
|
||||||
Caption = 'Description:'
|
Caption = 'Description:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object lblNotes: TLabel
|
object lblNotes: TLabel
|
||||||
|
AnchorSideLeft.Control = lblDescription
|
||||||
|
AnchorSideTop.Control = DescriptionEdit
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 47
|
Top = 47
|
||||||
Width = 34
|
Width = 34
|
||||||
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Notes:'
|
Caption = 'Notes:'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object imgResources: TImage
|
object imgResources: TImage
|
||||||
Left = 405
|
AnchorSideTop.Control = DescriptionEdit
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = tabResource
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 416
|
||||||
Height = 32
|
Height = 32
|
||||||
Top = 15
|
Top = 11
|
||||||
Width = 32
|
Width = 32
|
||||||
Anchors = [akTop]
|
Anchors = [akTop, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
|
BorderSpacing.Right = 10
|
||||||
Picture.Data = {
|
Picture.Data = {
|
||||||
07544269746D617076020000424D760200000000000076000000280000002000
|
07544269746D617076020000424D760200000000000076000000280000002000
|
||||||
0000200000000100040000000000000200000000000000000000100000001000
|
0000200000000100040000000000000200000000000000000000100000001000
|
||||||
@ -111,21 +138,37 @@ object ResEditForm: TResEditForm
|
|||||||
Transparent = True
|
Transparent = True
|
||||||
end
|
end
|
||||||
object DescriptionEdit: TEdit
|
object DescriptionEdit: TEdit
|
||||||
Left = 80
|
AnchorSideLeft.Control = lblDescription
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = tabResource
|
||||||
|
Left = 83
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 20
|
Top = 16
|
||||||
Width = 318
|
Width = 326
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
|
BorderSpacing.Left = 12
|
||||||
|
BorderSpacing.Top = 16
|
||||||
MaxLength = 255
|
MaxLength = 255
|
||||||
OnChange = Change
|
OnChange = Change
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object NotesMemo: TMemo
|
object NotesMemo: TMemo
|
||||||
|
AnchorSideLeft.Control = tabResource
|
||||||
|
AnchorSideTop.Control = lblNotes
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = tabResource
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
AnchorSideBottom.Control = tabResource
|
||||||
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 154
|
Height = 167
|
||||||
Top = 67
|
Top = 66
|
||||||
Width = 429
|
Width = 442
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
|
BorderSpacing.Left = 8
|
||||||
|
BorderSpacing.Top = 4
|
||||||
|
BorderSpacing.Right = 8
|
||||||
|
BorderSpacing.Bottom = 8
|
||||||
MaxLength = 1024
|
MaxLength = 1024
|
||||||
OnChange = Change
|
OnChange = Change
|
||||||
ScrollBars = ssVertical
|
ScrollBars = ssVertical
|
||||||
|
@ -58,11 +58,11 @@ type
|
|||||||
lblNotes: TLabel;
|
lblNotes: TLabel;
|
||||||
NotesMemo: TMemo;
|
NotesMemo: TMemo;
|
||||||
imgResources: TImage;
|
imgResources: TImage;
|
||||||
procedure OKBtnClick(Sender: TObject);
|
|
||||||
procedure FormCreate(Sender: TObject);
|
|
||||||
procedure CancelBtnClick(Sender: TObject);
|
procedure CancelBtnClick(Sender: TObject);
|
||||||
procedure Change(Sender: TObject);
|
procedure Change(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure FormShow(Sender: TObject);
|
procedure FormShow(Sender: TObject);
|
||||||
|
procedure OKBtnClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
procedure PositionControls;
|
procedure PositionControls;
|
||||||
procedure SetControls;
|
procedure SetControls;
|
||||||
@ -209,48 +209,12 @@ begin
|
|||||||
lblNotes.Caption := RSNotes;
|
lblNotes.Caption := RSNotes;
|
||||||
OKBtn.Caption := RSOKBtn;
|
OKBtn.Caption := RSOKBtn;
|
||||||
CancelBtn.Caption := RSCancelBtn;
|
CancelBtn.Caption := RSCancelBtn;
|
||||||
|
|
||||||
PositionControls;
|
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
procedure TResEditForm.PositionControls;
|
procedure TResEditForm.PositionControls;
|
||||||
var
|
|
||||||
HDelta: Integer = 8;
|
|
||||||
VDelta: Integer = 8;
|
|
||||||
begin
|
begin
|
||||||
HDelta := ScaleX(HDelta, DesignTimeDPI);
|
AlignOKCancel(OKBtn, CancelBtn, pnlBottom);
|
||||||
VDelta := ScaleY(VDelta, DesignTimeDPI);
|
|
||||||
|
|
||||||
DescriptionEdit.Left := lblDescription.Left + GetLabelWidth(lblDescription) + HDelta;
|
|
||||||
DescriptionEdit.Width := imgResources.Left - 2*HDelta - DescriptionEdit.Left;
|
|
||||||
DescriptionEdit.Top := imgResources.Top; // + (imgResources.Height - DescriptionEdit.Height) div 2;
|
|
||||||
lblDescription.Top := DescriptionEdit.Top + (DescriptionEdit.Height - lblDescription.Height) div 2;
|
|
||||||
|
|
||||||
lblNotes.Top := BottomOf(DescriptionEdit) + VDelta;
|
|
||||||
NotesMemo.Top := BottomOf(lblNotes) + VDelta;
|
|
||||||
ClientHeight := ClientHeight + ScaleY(NotesMemo.Height, DesignTimeDPI) - NotesMemo.Height;
|
|
||||||
NotesMemo.Height := tabResource.ClientHeight - NotesMemo.Top - VDelta;
|
|
||||||
|
|
||||||
OKBtn.Height := ScaleY(OKBtn.Height, DesignTimeDPI);
|
|
||||||
CancelBtn.Height := OKBtn.Height;
|
|
||||||
pnlBottom.Height := VDelta + OKBtn.Height + VDelta;
|
|
||||||
OKBtn.Top := VDelta;
|
|
||||||
CancelBtn.Top := VDelta;
|
|
||||||
|
|
||||||
OKBtn.Width := Max(GetButtonWidth(OKBtn), GetButtonWidth(CancelBtn));
|
|
||||||
CancelBtn.Width := OKBtn.Width;
|
|
||||||
{$IFDEF MSWINDOWS}
|
|
||||||
CancelBtn.Left := pnlBottom.ClientWidth - lblDescription.Left - CancelBtn.Width;
|
|
||||||
OKBtn.Left := CancelBtn.Left - OKBtn.Width - HDelta; // - (ClientWidth - tabResource.ClientWidth);
|
|
||||||
OKBtn.TabOrder := 0;
|
|
||||||
CancelBtn.TabOrder := 1;
|
|
||||||
{$ELSE}
|
|
||||||
OKBtn.Left := pnlBottom.ClientWidth - lblDescription.Left - OKBtn.Width;
|
|
||||||
CancelBtn.Left := OKBtn.Left - CancelBtn.Width - HDelta; // - (ClientWidth - tabResource.ClientWidth);
|
|
||||||
CancelBtn.TabOrder := 0;
|
|
||||||
OKBtn.TabOrder := 1;
|
|
||||||
{$ENDIF}
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TResEditForm.OKBtnClick(Sender: TObject);
|
procedure TResEditForm.OKBtnClick(Sender: TObject);
|
||||||
@ -287,6 +251,7 @@ procedure TResEditForm.FormShow(Sender: TObject);
|
|||||||
begin
|
begin
|
||||||
DescriptionEdit.SetFocus;
|
DescriptionEdit.SetFocus;
|
||||||
SetControls;
|
SetControls;
|
||||||
|
PositionControls;
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
|
||||||
|
@ -28,35 +28,37 @@ object TaskEditForm: TTaskEditForm
|
|||||||
AnchorSideTop.Control = ButtonPanel
|
AnchorSideTop.Control = ButtonPanel
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 4
|
Left = 4
|
||||||
Height = 17
|
Height = 15
|
||||||
Top = 8
|
Top = 9
|
||||||
Width = 108
|
Width = 88
|
||||||
BorderSpacing.Left = 4
|
BorderSpacing.Left = 4
|
||||||
Caption = 'Resource Name'
|
Caption = 'Resource Name'
|
||||||
Font.CharSet = ANSI_CHARSET
|
Font.CharSet = ANSI_CHARSET
|
||||||
Font.Color = clMaroon
|
Font.Color = clMaroon
|
||||||
Font.Height = -14
|
|
||||||
Font.Name = 'Tahoma'
|
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
end
|
end
|
||||||
object OKBtn: TButton
|
object OKBtn: TButton
|
||||||
AnchorSideTop.Control = CancelBtn
|
AnchorSideTop.Control = ButtonPanel
|
||||||
AnchorSideBottom.Control = CancelBtn
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideBottom.Side = asrBottom
|
AnchorSideBottom.Side = asrBottom
|
||||||
Left = 376
|
Left = 376
|
||||||
Height = 25
|
Height = 25
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 86
|
Width = 86
|
||||||
Anchors = [akTop, akRight, akBottom]
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Top = 4
|
||||||
BorderSpacing.Right = 4
|
BorderSpacing.Right = 4
|
||||||
|
BorderSpacing.Bottom = 4
|
||||||
Caption = 'OK'
|
Caption = 'OK'
|
||||||
Default = True
|
Default = True
|
||||||
OnClick = OKBtnClick
|
OnClick = OKBtnClick
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
object CancelBtn: TButton
|
object CancelBtn: TButton
|
||||||
|
AnchorSideTop.Control = ButtonPanel
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 479
|
Left = 479
|
||||||
Height = 25
|
Height = 25
|
||||||
|
@ -180,8 +180,6 @@ begin
|
|||||||
LblCreatedOn.Caption := RSCreatedOn + ' ' + FormatDateTime('ddddd', Task.CreatedOn);
|
LblCreatedOn.Caption := RSCreatedOn + ' ' + FormatDateTime('ddddd', Task.CreatedOn);
|
||||||
CbPriority.ItemIndex := Task.Priority + 1;
|
CbPriority.ItemIndex := Task.Priority + 1;
|
||||||
CbCategory.ItemIndex := Task.Category;
|
CbCategory.ItemIndex := Task.Category;
|
||||||
|
|
||||||
PositionControls;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TTaskEditForm.PositionControls;
|
procedure TTaskEditForm.PositionControls;
|
||||||
@ -281,6 +279,7 @@ end;
|
|||||||
|
|
||||||
procedure TTaskEditForm.FormShow(Sender: TObject);
|
procedure TTaskEditForm.FormShow(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
|
PositionControls;
|
||||||
DescriptionEdit.SetFocus;
|
DescriptionEdit.SetFocus;
|
||||||
end;
|
end;
|
||||||
{=====}
|
{=====}
|
||||||
|
Reference in New Issue
Block a user