📄 ganttdetailsunit.pas
字号:
{-----------------------------------------------------------------------------
Unit Name: GanttDetailsUnit
Author: paul fisher
Purpose:
History:
-----------------------------------------------------------------------------}
unit GanttDetailsUnit;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, ExtCtrls, Spin, GanttUnit, ComCtrls;
type
TGanttDetailsForm = class(TForm)
Panel1: TPanel;
Panel2: TPanel;
Button1: TButton;
Button2: TButton;
ItemNameEdit: TEdit;
Label1: TLabel;
Label3: TLabel;
ShadowColorBox: TColorBox;
Label4: TLabel;
StartComboBox: TComboBox;
LengthSpinEdit: TSpinEdit;
Label6: TLabel;
TitlesColorBox: TColorBox;
Label7: TLabel;
Label2: TLabel;
ProjectHeightEdit: TSpinEdit;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
TitlesSpinEdit: TSpinEdit;
Label5: TLabel;
private
{ Private declarations }
public
{ Public declarations }
function EditDetails(var Gantt: TGanttChart): Boolean;
end;
var
GanttDetailsForm: TGanttDetailsForm;
implementation
{$R *.dfm}
function TGanttDetailsForm.EditDetails(var Gantt: TGanttChart): Boolean;
begin
Result := False;
ItemNameEdit.Text := Gantt.GanttTitle;
ShadowColorBox.Selected := Gantt.ShadowColour;
TitlesColorBox.Selected := Gantt.ProjectTitleColour;
LengthSpinEdit.Value := Gantt.DayWidth;
ProjectHeightEdit.Value := Gantt.ProjectHeight;
StartComboBox.ItemIndex := Gantt.StartMonth -1 ;
CheckBox1.Checked := Gantt.Shadows;
CheckBox2.Checked := Gantt.ShowItemLength;
TitlesSpinEdit.Value := Gantt.TitlesBoxWidth;
if showmodal = mrOK then
begin
Gantt.GanttTitle := ItemNameEdit.Text;
Gantt.ShadowColour := ShadowColorBox.Selected;
Gantt.ProjectTitleColour := TitlesColorBox.Selected;
Gantt.DayWidth := LengthSpinEdit.Value;
Gantt.ProjectHeight := ProjectHeightEdit.Value;
Gantt.StartMonth := StartComboBox.ItemIndex +1;
Gantt.Shadows := CheckBox1.Checked;
Gantt.ShowItemLength := CheckBox2.Checked;
Gantt.TitlesBoxWidth := TitlesSpinEdit.Value;
Result := True;
end;
close;
end;
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -