📄 jvdyncontrolenginevcldb.pas
字号:
destructor TJvDynControlVCLDBDirectoryEdit.Destroy;
begin
FreeAndNil(FEditControl);
FreeAndNil(FButton);
inherited Destroy;
end;
procedure TJvDynControlVCLDBDirectoryEdit.DefaultOnButtonClick(Sender: TObject);
var
{$IFDEF VCL}
Opt: TSelectDirOpts;
Dir: string;
{$ENDIF VCL}
{$IFDEF VisualCLX}
Dir: WideString;
{$ENDIF VisualCLX}
begin
Dir := ControlGetValue;
if Dir = '' then
if FInitialDir <> '' then
Dir := FInitialDir
else
Dir := PathDelim;
if not DirectoryExists(Dir) then
Dir := PathDelim;
{$IFDEF VCL}
if SelectDirectory(Dir, Opt, HelpContext) then
{$ENDIF VCL}
{$IFDEF VisualCLX}
{$IFDEF MSWINDOWS}
if SelectDirectory('', '', Dir) then
{$ENDIF MSWINDOWS}
{$IFDEF UNIX}
if SelectDirectory('', '/', Dir, False) then
{$ENDIF UNIX}
{$ENDIF VisualCLX}
ControlSetValue(Dir);
if FEditControl.CanFocus then
FEditControl.SetFocus;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetDefaultProperties;
begin
Self.Caption := ' ';
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetReadOnly(Value: Boolean);
begin
FEditControl.ReadOnly := Value;
FButton.Enabled := not Value;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetCaption(const Value: string);
begin
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetHint(const Value: string);
begin
Hint := Value;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetOnEnter(Value: TNotifyEvent);
begin
FEditControl.OnEnter := Value;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetOnExit(Value: TNotifyEvent);
begin
FEditControl.OnExit := Value;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetOnChange(Value: TNotifyEvent);
begin
FEditControl.OnChange := Value;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetOnClick(Value: TNotifyEvent);
begin
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetValue(Value: Variant);
begin
FEditControl.Text := Value;
end;
function TJvDynControlVCLDBDirectoryEdit.ControlGetValue: Variant;
begin
Result := FEditControl.Text;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetInitialDir(const Value: string);
begin
FInitialDir := Value;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetDialogTitle(const Value: string);
begin
FDialogTitle := Value;
end;
{$IFDEF VCL}
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetDialogOptions(Value: TSelectDirOpts);
begin
FDialogOptions := Value;
end;
{$ENDIF VCL}
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetDataSource(Value: TDataSource);
begin
FEditControl.DataSource := Value;
end;
function TJvDynControlVCLDBDirectoryEdit.ControlGetDataSource: TDataSource;
begin
Result := FEditControl.DataSource;
end;
procedure TJvDynControlVCLDBDirectoryEdit.ControlSetDataField(const Value: string);
begin
FEditControl.DataField := Value;
end;
function TJvDynControlVCLDBDirectoryEdit.ControlGetDataField: string;
begin
Result := FEditControl.DataField;
end;
//=== { TJvDynControlVCLDBCheckBox } =========================================
procedure TJvDynControlVCLDBCheckBox.ControlSetDefaultProperties;
begin
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetCaption(const Value: string);
begin
Caption := Value;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetHint(const Value: string);
begin
Hint := Value;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetOnChange(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetOnClick(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetValue(Value: Variant);
begin
Checked := JvDynControlVariantToBoolean(Value);
end;
function TJvDynControlVCLDBCheckBox.ControlGetValue: Variant;
begin
Result := Checked;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetDataSource(Value: TDataSource);
begin
DataSource := Value;
end;
function TJvDynControlVCLDBCheckBox.ControlGetDataSource: TDataSource;
begin
Result := DataSource;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetDataField(const Value: string);
begin
DataField := Value;
end;
function TJvDynControlVCLDBCheckBox.ControlGetDataField: string;
begin
Result := DataField;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetValueChecked(Value: Variant);
begin
ValueChecked := Value;
end;
procedure TJvDynControlVCLDBCheckBox.ControlSetValueUnChecked(Value: Variant);
begin
ValueUnChecked := Value;
end;
//=== { TJvDynControlVCLDBMemo } =============================================
procedure TJvDynControlVCLDBMemo.ControlSetDefaultProperties;
begin
end;
procedure TJvDynControlVCLDBMemo.ControlSetReadOnly(Value: Boolean);
begin
ReadOnly := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetCaption(const Value: string);
begin
end;
procedure TJvDynControlVCLDBMemo.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetHint(const Value: string);
begin
Hint := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetOnChange(Value: TNotifyEvent);
begin
OnChange := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetOnClick(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetValue(Value: Variant);
begin
Text := Value;
end;
function TJvDynControlVCLDBMemo.ControlGetValue: Variant;
begin
Result := Text;
end;
procedure TJvDynControlVCLDBMemo.ControlSetSorted(Value: Boolean);
begin
end;
procedure TJvDynControlVCLDBMemo.ControlSetItems(Value: TStrings);
begin
Lines.Assign(Value);
end;
function TJvDynControlVCLDBMemo.ControlGetItems: TStrings;
begin
Result := Lines;
end;
procedure TJvDynControlVCLDBMemo.ControlSetWantTabs(Value: Boolean);
begin
WantTabs := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetWantReturns(Value: Boolean);
begin
WantReturns := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetWordWrap(Value: Boolean);
begin
WordWrap := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetScrollBars(Value: TScrollStyle);
begin
ScrollBars := Value;
end;
procedure TJvDynControlVCLDBMemo.ControlSetDataSource(Value: TDataSource);
begin
DataSource := Value;
end;
function TJvDynControlVCLDBMemo.ControlGetDataSource: TDataSource;
begin
Result := DataSource;
end;
procedure TJvDynControlVCLDBMemo.ControlSetDataField(const Value: string);
begin
DataField := Value;
end;
function TJvDynControlVCLDBMemo.ControlGetDataField: string;
begin
Result := DataField;
end;
//=== { TJvDynControlVCLDBRadioGroup } =======================================
procedure TJvDynControlVCLDBRadioGroup.ControlSetDefaultProperties;
begin
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetCaption(const Value: string);
begin
Caption := Value;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetHint(const Value: string);
begin
Hint := Value;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetOnChange(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetOnClick(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetValue(Value: Variant);
begin
if VarIsInt(Value) then
ItemIndex := Value
else
ItemIndex := Items.IndexOf(Value);
end;
function TJvDynControlVCLDBRadioGroup.ControlGetValue: Variant;
begin
Result := ItemIndex;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetSorted(Value: Boolean);
begin
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetItems(Value: TStrings);
begin
Items.Assign(Value);
end;
function TJvDynControlVCLDBRadioGroup.ControlGetItems: TStrings;
begin
Result := Items;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetColumns(Value: Integer);
begin
Columns := Value;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetDataSource(Value: TDataSource);
begin
DataSource := Value;
end;
function TJvDynControlVCLDBRadioGroup.ControlGetDataSource: TDataSource;
begin
Result := DataSource;
end;
procedure TJvDynControlVCLDBRadioGroup.ControlSetDataField(const Value: string);
begin
DataField := Value;
end;
function TJvDynControlVCLDBRadioGroup.ControlGetDataField: string;
begin
Result := DataField;
end;
//=== { TJvDynControlVCLDBListBox } ==========================================
procedure TJvDynControlVCLDBListBox.ControlSetDefaultProperties;
begin
end;
procedure TJvDynControlVCLDBListBox.ControlSetCaption(const Value: string);
begin
end;
procedure TJvDynControlVCLDBListBox.ControlSetTabOrder(Value: Integer);
begin
TabOrder := Value;
end;
procedure TJvDynControlVCLDBListBox.ControlSetHint(const Value: string);
begin
Hint := Value;
end;
procedure TJvDynControlVCLDBListBox.ControlSetOnEnter(Value: TNotifyEvent);
begin
OnEnter := Value;
end;
procedure TJvDynControlVCLDBListBox.ControlSetOnExit(Value: TNotifyEvent);
begin
OnExit := Value;
end;
procedure TJvDynControlVCLDBListBox.ControlSetOnChange(Value: TNotifyEvent);
begin
// OnChange := Value;
end;
procedure TJvDynControlVCLDBListBox.ControlSetOnClick(Value: TNotifyEvent);
begin
OnClick := Value;
end;
procedure TJvDynControlVCLDBListBox.ControlSetValue(Value: Variant);
begin
if VarIsInt(Value) then
ItemIndex := Value
else
ItemIndex := Items.IndexOf(Value);
end;
function TJvDynControlVCLDBListBox.ControlGetValue: Variant;
begin
Result := ItemIndex;
end;
procedure TJvDynControlVCLDBListBox.ControlSetSorted(Value: Boolean);
begin
Sorted := Value;
end;
procedure TJvDynControlVCLDBListBox.ControlSetItems(Value: TStrings);
begin
Items.Assign(Value);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -