cxdxgridconverter.pas
来自「胜天进销存源码,国产优秀的进销存」· PAS 代码 · 共 1,743 行 · 第 1/5 页
PAS
1,743 行
if (FHeaderColor <> clBtnface) or not DefaultFont(FFont) then
begin
AStyle := Converter.CreateStyleItem;
(AStyle as TcxStyle).Color := FHeaderColor;
(AStyle as TcxStyle).Font.Assign(FFont);
(AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color;
cxGridView.Styles.Footer := AStyle as TcxStyle;
end;
AAutoSearchColor := Converter.GetIntegerProperty(nil, 'AutoSearchColor');
AAutoSearchTextColor := Converter.GetIntegerProperty(nil, 'AutoSearchTextColor');
if (AAutoSearchColor <> clNone) or (AAutoSearchTextColor <> clNone) then
begin
AStyle := Converter.CreateStyleItem;
(AStyle as TcxStyle).Color := AAutoSearchColor;
(AStyle as TcxStyle).TextColor := AAutoSearchTextColor;
cxGridView.Styles.IncSearch := AStyle as TcxStyle;
end;
APreviewFont := Converter.GetClassProperty(nil, 'PreviewFont') as TFont;
if not DefaultPreviewFont(APreviewFont) then
begin
AStyle := Converter.CreateStyleItem;
(AStyle as TcxStyle).Color := FColor;
(AStyle as TcxStyle).Font.Assign(APreviewFont);
(AStyle as TcxStyle).TextColor := (AStyle as TcxStyle).Font.Color;
cxGridView.Styles.Preview := AStyle as TcxStyle;
end;
AGridLineColor := Converter.GetIntegerProperty(nil, 'GridLineColor');
if AGridLineColor <> clNone then
cxGridView.OptionsView.GridLineColor := Converter.GetIntegerProperty(nil, 'GridLineColor');
AHighlightColor := Converter.GetIntegerProperty(nil, 'HighlightColor');
AHighlightTextColor := Converter.GetIntegerProperty(nil, 'HighlightTextColor');
if (AHighlightColor <> clHighlight) or (AHighlightTextColor <> clHighlightText) then
begin
AStyle := Converter.CreateStyleItem;
(AStyle as TcxStyle).Color := AHighlightColor;
(AStyle as TcxStyle).TextColor := AHighlightTextColor;
cxGridView.Styles.Selection := AStyle as TcxStyle;
end;
AHideSelectionColor := Converter.GetIntegerProperty(nil, 'HideSelectionColor');
AHideSelectionTextColor := Converter.GetIntegerProperty(nil, 'HideSelectionTextColor');
if (AHideSelectionColor <> clHighlight) or (AHideSelectionTextColor <> clHighlightText) then
begin
AStyle := Converter.CreateStyleItem;
(AStyle as TcxStyle).Color := AHideSelectionColor;
(AStyle as TcxStyle).TextColor := AHideSelectionTextColor;
cxGridView.Styles.Inactive := AStyle as TcxStyle;
end;
end;
procedure TcxRealConverterToTableView.ImportPreview;
var
APreview: string;
I: Integer;
begin
APreview := Converter.GetStringProperty(nil, 'PreviewFieldName', '');
if APreview <> '' then
begin
for I := 0 to cxGridView.ColumnCount - 1 do
if TestPreviewFieldName(I, APreview) then
begin
cxGridView.Preview.Column := cxGridView.Columns[I];
Break;
end;
end;
cxGridView.Preview.Place := ppBottom;
cxGridView.Preview.AutoHeight := False;
cxGridView.Preview.MaxLineCount := Converter.GetIntegerProperty(nil, 'PreviewLines',
cxGridView.Preview.MaxLineCount);
end;
procedure TcxRealConverterToTableView.ImportPropertiesBlobEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxBlobEditProperties;
AConverter := TcxBlobEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesButtonEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxButtonEditProperties;
AConverter := TcxButtonEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesCalcEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxCalcEditProperties;
AConverter := TcxCalcEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesCheckBox(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxCheckBoxProperties;
AConverter := TcxCheckBoxPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesComboBox(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxComboBoxProperties;
AConverter := TcxComboBoxPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesCurencyEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxCurrencyEditProperties;
AConverter := TcxCurrencyEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesDateEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxDateEditProperties;
AConverter := TcxDateEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesExLookupComboBox(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
begin
end;
procedure TcxRealConverterToTableView.ImportPropertiesHyperLinkEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxHyperLinkEditProperties;
AConverter := TcxHyperLinkEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesImage(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxImageProperties;
AConverter := TcxImagePropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesImageComboBox(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxImageComboBoxProperties;
AConverter := TcxImageComboBoxPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesLookupComboBox(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxLookupComboBoxProperties;
AConverter := TcxLookupComboBoxPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesMaskEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxMaskEditProperties;
AConverter := TcxMaskEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesMemo(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxMemoProperties;
AConverter := TcxMemoPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesMRUEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxMRUEditProperties;
AConverter := TcxMRUEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesPopupEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxPopupEditProperties;
AConverter := TcxPopupEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesSpinEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxSpinEditProperties;
AConverter := TcxSpinEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
AcxColumn.Options.ShowEditButtons := ConvertColumnShowEditButtons(
Converter.GetEnumProperty(AdxColumn, 'ShowButtonStyle'));
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesTextEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxTextEditProperties;
AConverter := TcxTextEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportPropertiesTimeEdit(
AdxColumn: TObject; AcxColumn: TcxGridColumn);
var
AConverter: TcxCustomPropertiesConverter;
begin
AcxColumn.PropertiesClass := TcxTimeEditProperties;
AConverter := TcxTimeEditPropertiesConverter.Create(AcxColumn.Properties);
try
AConverter.ImportFrom(AdxColumn);
finally
AConverter.Free;
end;
end;
procedure TcxRealConverterToTableView.ImportSummaryGroups;
var
ASummaryGroups: TObject;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?