📄 jvqdyncontrolenginejvcl.pas
字号:
function TJvDynControlJVCLDirectoryEdit.ControlGetValue: Variant;
begin
Result := Text;
end;
procedure TJvDynControlJVCLDirectoryEdit.ControlSetInitialDir(Value: string);
begin
InitialDir := Value;
end;
procedure TJvDynControlJVCLDirectoryEdit.ControlSetDialogTitle(Value: string);
begin
DialogText := Value;
end;
procedure TJvDynControlJVCLDirectoryEdit.ControlSetDialogOptions(Value: TSelectDirOpts);
begin
DialogOptions := Value;
end;
//=== TJvDynControlJVCLDateTimeEdit ==========================================
constructor TJvDynControlJVCLDateTimeEdit.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Caption := '';
BorderStyle := bsNone;
BevelInner := bvNone;
BevelOuter := bvNone;
FDatePicker := TJvDateTimePicker.Create(Self);
FDatePicker.Parent := Self;
FDatePicker.Align := alLeft;
FDatePicker.Top := 0;
FDatePicker.Left := 0;
FTimePicker := TJvDateTimePicker.Create(Self);
FTimePicker.Align := alClient;
FTimePicker.Parent := Self;
FTimePicker.Top := 0;
FTimePicker.Left := 0;
Height := FDatePicker.Height;
Width := FDatePicker.Width + FTimePicker.Width;
OnResize := ControlResize;
ControlResize(nil);
FDatePicker.DateFormat := dfShort;
FDatePicker.DateMode := dmComboBox;
FDatePicker.Kind := dtkDate;
FTimePicker.DateFormat := dfShort;
FTimePicker.DateMode := dmUpDown;
FTimePicker.Kind := dtkTime;
end;
destructor TJvDynControlJVCLDateTimeEdit.Destroy;
begin
FreeAndNil(FDatePicker);
FreeAndNil(FTimePicker);
inherited Destroy;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlResize(Sender: TObject);
begin
FDatePicker.Height := Height div 2;
FTimePicker.Height := Height;
FDatePicker.Width := Width div 2;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetDefaultProperties;
begin
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetCaption(Value: string);
begin
//Caption := Value;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetOnEnter(Value: TNotifyEvent);
begin
FDatePicker.OnEnter := Value;
FTimePicker.OnEnter := Value;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetOnExit(Value: TNotifyEvent);
begin
FDatePicker.OnExit := Value;
FTimePicker.OnExit := Value;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetOnChange(Value: TNotifyEvent);
begin
FDatePicker.OnChange := Value;
FTimePicker.OnChange := Value;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetOnClick(Value: TNotifyEvent);
begin
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetValue(Value: Variant);
begin
FDatePicker.Date := Value;
FTimePicker.Time := Value;
end;
function TJvDynControlJVCLDateTimeEdit.ControlGetValue: Variant;
begin
Result := trunc(FDatePicker.Date) + (trunc(FTimePicker.Time) - FTimePicker.Time);
end;
// IJvDynControlDate
procedure TJvDynControlJVCLDateTimeEdit.ControlSetMinDate(Value: TDateTime);
begin
FDatePicker.MinDate := Value;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetMaxDate(Value: TDateTime);
begin
FDatePicker.MaxDate := Value;
end;
procedure TJvDynControlJVCLDateTimeEdit.ControlSetFormat(Value: string);
begin
FDatePicker.Format := Value;
FTimePicker.Format := Value;
end;
//=== TJvDynControlJVCLDateEdit ==============================================
procedure TJvDynControlJVCLDateEdit.ControlSetDefaultProperties;
begin
DateFormat := dfShort;
DateMode := dmComboBox;
Kind := dtkDate;
end;
procedure TJvDynControlJVCLDateEdit.ControlSetCaption(Value: string);
begin
end;
procedure TJvDynControlJVCLDateEdit.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlJVCLDateEdit.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlJVCLDateEdit.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlJVCLDateEdit.ControlSetOnChange(Value: TNotifyEvent);
begin
OnChange := Value;
end;
procedure TJvDynControlJVCLDateEdit.ControlSetOnClick(Value: TNotifyEvent);
begin
end;
procedure TJvDynControlJVCLDateEdit.ControlSetValue(Value: Variant);
begin
Text := Value;
end;
function TJvDynControlJVCLDateEdit.ControlGetValue: Variant;
begin
Result := Text;
end;
// IJvDynControlDate
procedure TJvDynControlJVCLDateEdit.ControlSetMinDate(Value: TDateTime);
begin
MinDate := Value;
end;
procedure TJvDynControlJVCLDateEdit.ControlSetMaxDate(Value: TDateTime);
begin
MaxDate := Value;
end;
procedure TJvDynControlJVCLDateEdit.ControlSetFormat(Value: string);
begin
Format := Value;
end;
//=== TJvDynControlJVCLTimeEdit ==============================================
procedure TJvDynControlJVCLTimeEdit.ControlSetDefaultProperties;
begin
DateFormat := dfShort;
Kind := dtkTime;
DateMode := dmUpDown;
end;
procedure TJvDynControlJVCLTimeEdit.ControlSetCaption(Value: string);
begin
end;
procedure TJvDynControlJVCLTimeEdit.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlJVCLTimeEdit.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlJVCLTimeEdit.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlJVCLTimeEdit.ControlSetOnChange(Value: TNotifyEvent);
begin
OnChange := Value;
end;
procedure TJvDynControlJVCLTimeEdit.ControlSetOnClick(Value: TNotifyEvent);
begin
end;
procedure TJvDynControlJVCLTimeEdit.ControlSetValue(Value: Variant);
begin
Text := Value;
end;
function TJvDynControlJVCLTimeEdit.ControlGetValue: Variant;
begin
Result := Text;
end;
procedure TJvDynControlJVCLTimeEdit.ControlSetFormat(Value: string);
begin
Format := Value;
end;
//=== TJvDynControlJVCLCheckBox ==============================================
procedure TJvDynControlJVCLCheckBox.ControlSetDefaultProperties;
begin
end;
procedure TJvDynControlJVCLCheckBox.ControlSetReadOnly(Value: Boolean);
begin
Enabled := False;
end;
procedure TJvDynControlJVCLCheckBox.ControlSetCaption(Value: string);
begin
Caption := Value;
end;
procedure TJvDynControlJVCLCheckBox.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlJVCLCheckBox.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlJVCLCheckBox.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlJVCLCheckBox.ControlSetOnChange(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlJVCLCheckBox.ControlSetOnClick(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlJVCLCheckBox.ControlSetValue(Value: Variant);
begin
if VarType(Value) = varBoolean then
Checked := Value
else
Checked := UpperCase(Value) = 'TRUE';
end;
function TJvDynControlJVCLCheckBox.ControlGetValue: Variant;
begin
Result := Checked;
end;
//=== TJvDynControlJVCLMemo ==================================================
procedure TJvDynControlJVCLMemo.ControlSetDefaultProperties;
begin
end;
procedure TJvDynControlJVCLMemo.ControlSetReadOnly(Value: Boolean);
begin
ReadOnly := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetCaption(Value: string);
begin
end;
procedure TJvDynControlJVCLMemo.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetOnChange(Value: TNotifyEvent);
begin
OnChange := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetOnClick(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetValue(Value: Variant);
begin
Text := Value;
end;
function TJvDynControlJVCLMemo.ControlGetValue: Variant;
begin
Result := Text;
end;
procedure TJvDynControlJVCLMemo.ControlSetSorted(Value: Boolean);
begin
end;
procedure TJvDynControlJVCLMemo.ControlSetItems(Value: TStrings);
begin
Lines.Assign(Value);
end;
function TJvDynControlJVCLMemo.ControlGetItems: TStrings;
begin
Result := Lines;
end;
procedure TJvDynControlJVCLMemo.ControlSetWantTabs(Value: Boolean);
begin
WantTabs := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetWantReturns(Value: Boolean);
begin
WantReturns := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetWordWrap(Value: Boolean);
begin
WordWrap := Value;
end;
procedure TJvDynControlJVCLMemo.ControlSetScrollBars(Value: TScrollStyle);
begin
ScrollBars := Value;
end;
//=== TJvDynControlJVCLRadioGroup ============================================
procedure TJvDynControlJVCLRadioGroup.ControlSetDefaultProperties;
begin
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetReadOnly(Value: Boolean);
begin
ReadOnly := Value;
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetCaption(Value: string);
begin
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetOnChange(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetOnClick(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetValue(Value: Variant);
begin
if VarType(Value) in [varSmallint, varInteger] then
ItemIndex := Value
else
try
ItemIndex := Value;
except
ItemIndex := Items.IndexOf(Value);
end;
end;
function TJvDynControlJVCLRadioGroup.ControlGetValue: Variant;
begin
Result := ItemIndex;
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetSorted(Value: Boolean);
begin
end;
procedure TJvDynControlJVCLRadioGroup.ControlSetItems(Value: TStrings);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -