You've already forked lazarus-ccr
RxDBGrid - new property TRxCollumn.SortField - define custom sort field(s) for grid collumn
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2896 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,32 +1,40 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<Package Version="3">
|
<Package Version="4">
|
||||||
<Name Value="dcl_rx_ctrl"/>
|
<Name Value="dcl_rx_ctrl"/>
|
||||||
<AddToProjectUsesSection Value="False"/>
|
|
||||||
<Author Value="Lagunov A.A."/>
|
<Author Value="Lagunov A.A."/>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="8"/>
|
<Version Value="11"/>
|
||||||
<SearchPaths>
|
<SearchPaths>
|
||||||
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)/"/>
|
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
|
||||||
</SearchPaths>
|
</SearchPaths>
|
||||||
|
<Parsing>
|
||||||
|
<SyntaxOptions>
|
||||||
|
<UseAnsiStrings Value="False"/>
|
||||||
|
</SyntaxOptions>
|
||||||
|
</Parsing>
|
||||||
<Other>
|
<Other>
|
||||||
<CompilerPath Value="$(CompPath)"/>
|
<CompilerPath Value="$(CompPath)"/>
|
||||||
</Other>
|
</Other>
|
||||||
</CompilerOptions>
|
</CompilerOptions>
|
||||||
<Description Value="Design time packet for rx lib"/>
|
<Description Value="Design time packet for rx lib"/>
|
||||||
<Version Major="1"/>
|
<Version Major="2" Minor="6" Release="4" Build="1"/>
|
||||||
<Files Count="1">
|
<Files Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="register_rxctrl.pas"/>
|
<Filename Value="register_rxctrl.pas"/>
|
||||||
<HasRegisterProc Value="True"/>
|
<HasRegisterProc Value="True"/>
|
||||||
<UnitName Value="register_rxctrl"/>
|
<UnitName Value="register_rxctrl"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
|
<Item2>
|
||||||
|
<Filename Value="rxceeditlookupfields.pas"/>
|
||||||
|
<UnitName Value="rxceEditLookupFields"/>
|
||||||
|
</Item2>
|
||||||
</Files>
|
</Files>
|
||||||
<Type Value="DesignTime"/>
|
<Type Value="DesignTime"/>
|
||||||
<RequiredPkgs Count="2">
|
<RequiredPkgs Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="rxnew"/>
|
<PackageName Value="rxnew"/>
|
||||||
<MinVersion Major="1" Minor="2" Valid="True"/>
|
<MinVersion Major="2" Minor="6" Valid="True"/>
|
||||||
</Item1>
|
</Item1>
|
||||||
<Item2>
|
<Item2>
|
||||||
<PackageName Value="FCL"/>
|
<PackageName Value="FCL"/>
|
||||||
@ -34,7 +42,7 @@
|
|||||||
</Item2>
|
</Item2>
|
||||||
</RequiredPkgs>
|
</RequiredPkgs>
|
||||||
<UsageOptions>
|
<UsageOptions>
|
||||||
<UnitPath Value="$(PkgOutDir)/"/>
|
<UnitPath Value="$(PkgOutDir)"/>
|
||||||
</UsageOptions>
|
</UsageOptions>
|
||||||
<PublishOptions>
|
<PublishOptions>
|
||||||
<Version Value="2"/>
|
<Version Value="2"/>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
{ Этот файл был автоматически создан Lazarus. Н�
|
{ This file was automatically created by Lazarus. Do not edit!
|
||||||
� редактировать!
|
This source is only used to compile and install the package.
|
||||||
Исходный код используется только для комп�
|
|
||||||
�ляции и установки пакета.
|
|
||||||
}
|
}
|
||||||
|
|
||||||
unit dcl_rx_ctrl;
|
unit dcl_rx_ctrl;
|
||||||
@ -9,7 +7,7 @@ unit dcl_rx_ctrl;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
register_rxctrl, LazarusPackageIntf;
|
register_rxctrl, rxceEditLookupFields, LazarusPackageIntf;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ type
|
|||||||
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
||||||
function EnabledFooterRowsCalc:boolean;override;
|
function EnabledFooterRowsCalc:boolean;override;
|
||||||
public
|
public
|
||||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
procedure Sort(FieldName: string; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||||
procedure SortList(ListField:string; ADataSet:TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);override;
|
procedure SortList(ListField:string; ADataSet:TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -87,11 +87,11 @@ begin
|
|||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFBDataSetSortEngine.Sort(Field: TField; ADataSet: TDataSet;
|
procedure TFBDataSetSortEngine.Sort(FieldName: string; ADataSet: TDataSet;
|
||||||
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
||||||
begin
|
begin
|
||||||
if Assigned(ADataSet) then
|
if Assigned(ADataSet) then
|
||||||
(ADataSet as TFBDataSet).SortOnField(Field.FieldName, Asc);
|
(ADataSet as TFBDataSet).SortOnField(FieldName, Asc);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFBDataSetSortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
procedure TFBDataSetSortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
||||||
|
@ -43,7 +43,7 @@ type
|
|||||||
|
|
||||||
TSQLQuerySortEngine = class(TRxDBGridSortEngine)
|
TSQLQuerySortEngine = class(TRxDBGridSortEngine)
|
||||||
public
|
public
|
||||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
procedure Sort(FieldName: string; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||||
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); override;
|
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -51,10 +51,10 @@ implementation
|
|||||||
uses SQLDB, synRegExpr, strUtils;
|
uses SQLDB, synRegExpr, strUtils;
|
||||||
|
|
||||||
|
|
||||||
procedure TSQLQuerySortEngine.Sort(Field: TField; ADataSet: TDataSet;
|
procedure TSQLQuerySortEngine.Sort(FieldName: string; ADataSet: TDataSet;
|
||||||
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
||||||
begin
|
begin
|
||||||
SortList(Field.FieldName,ADataSet,Asc,SortOptions);
|
SortList(FieldName,ADataSet,Asc,SortOptions);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TSQLQuerySortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
procedure TSQLQuerySortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
||||||
|
@ -16,7 +16,7 @@ type
|
|||||||
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
||||||
function EnabledFooterRowsCalc:boolean;override;
|
function EnabledFooterRowsCalc:boolean;override;
|
||||||
public
|
public
|
||||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
procedure Sort(FieldName: string; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||||
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); override;
|
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -117,12 +117,13 @@ begin
|
|||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TZeosDataSetSortEngine.Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);
|
procedure TZeosDataSetSortEngine.Sort(FieldName: string; ADataSet: TDataSet;
|
||||||
|
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
||||||
begin
|
begin
|
||||||
if not Assigned(ADataSet) then exit;
|
if not Assigned(ADataSet) then exit;
|
||||||
if ADataSet is TZAbstractDataset then
|
if ADataSet is TZAbstractDataset then
|
||||||
begin
|
begin
|
||||||
TZAbstractDataset(ADataSet).SortedFields:=Field.FieldName;
|
TZAbstractDataset(ADataSet).SortedFields:=FieldName;
|
||||||
if Asc then
|
if Asc then
|
||||||
TZAbstractDataset(ADataSet).SortType:=stAscending
|
TZAbstractDataset(ADataSet).SortType:=stAscending
|
||||||
else
|
else
|
||||||
|
@ -213,6 +213,10 @@ msgstr "Registro"
|
|||||||
msgid "Retry to connect with database?"
|
msgid "Retry to connect with database?"
|
||||||
msgstr "Reintentar conectar con la base de dato?"
|
msgstr "Reintentar conectar con la base de dato?"
|
||||||
|
|
||||||
|
#: rxdconst.srxallfields
|
||||||
|
msgid "All fields"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxascendign
|
#: rxdconst.srxascendign
|
||||||
msgid "Ascendign"
|
msgid "Ascendign"
|
||||||
msgstr "Ascendente"
|
msgstr "Ascendente"
|
||||||
@ -316,6 +320,18 @@ msgstr "Ordenar por Columnas"
|
|||||||
msgid "Descending"
|
msgid "Descending"
|
||||||
msgstr "Descendente"
|
msgstr "Descendente"
|
||||||
|
|
||||||
|
#: rxdconst.srxfieldslookupdisplay
|
||||||
|
msgid "Fields as LookupDisplay"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfillfieldslookupdisp
|
||||||
|
msgid "Fill fields in LookupDisplay property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfillsortfieldsdisp
|
||||||
|
msgid "Fill fields in SortField property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxfilterformapply
|
#: rxdconst.srxfilterformapply
|
||||||
msgid "Apply"
|
msgid "Apply"
|
||||||
msgstr "Aceptar"
|
msgstr "Aceptar"
|
||||||
@ -403,6 +419,10 @@ msgstr "&Campos Disponibles :"
|
|||||||
msgid "Select f&ield for sort data:"
|
msgid "Select f&ield for sort data:"
|
||||||
msgstr "Seleccionar Dirección de Ordenamiento :"
|
msgstr "Seleccionar Dirección de Ordenamiento :"
|
||||||
|
|
||||||
|
#: rxdconst.srxsortfieldsdisplay
|
||||||
|
msgid "Fields as SortField"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxsoursedataset
|
#: rxdconst.srxsoursedataset
|
||||||
msgid "Sourse dataset"
|
msgid "Sourse dataset"
|
||||||
msgstr "Fuente del Conjunto de Datos"
|
msgstr "Fuente del Conjunto de Datos"
|
||||||
|
@ -213,6 +213,10 @@ msgstr ""
|
|||||||
msgid "Retry to connect with database?"
|
msgid "Retry to connect with database?"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxallfields
|
||||||
|
msgid "All fields"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxascendign
|
#: rxdconst.srxascendign
|
||||||
msgid "Ascendign"
|
msgid "Ascendign"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -316,6 +320,18 @@ msgstr ""
|
|||||||
msgid "Descending"
|
msgid "Descending"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfieldslookupdisplay
|
||||||
|
msgid "Fields as LookupDisplay"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfillfieldslookupdisp
|
||||||
|
msgid "Fill fields in LookupDisplay property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfillsortfieldsdisp
|
||||||
|
msgid "Fill fields in SortField property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxfilterformapply
|
#: rxdconst.srxfilterformapply
|
||||||
msgid "Apply"
|
msgid "Apply"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
@ -401,6 +417,10 @@ msgstr ""
|
|||||||
msgid "Select f&ield for sort data:"
|
msgid "Select f&ield for sort data:"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxsortfieldsdisplay
|
||||||
|
msgid "Fields as SortField"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxsoursedataset
|
#: rxdconst.srxsoursedataset
|
||||||
msgid "Sourse dataset"
|
msgid "Sourse dataset"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -213,6 +213,10 @@ msgstr "Регистрация"
|
|||||||
msgid "Retry to connect with database?"
|
msgid "Retry to connect with database?"
|
||||||
msgstr "Вы хотите повторить попытку соединения с базой данных?"
|
msgstr "Вы хотите повторить попытку соединения с базой данных?"
|
||||||
|
|
||||||
|
#: rxdconst.srxallfields
|
||||||
|
msgid "All fields"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxascendign
|
#: rxdconst.srxascendign
|
||||||
msgid "Ascendign"
|
msgid "Ascendign"
|
||||||
msgstr "По возрастанию"
|
msgstr "По возрастанию"
|
||||||
@ -316,6 +320,18 @@ msgstr "Сортировать данные по колонкам"
|
|||||||
msgid "Descending"
|
msgid "Descending"
|
||||||
msgstr "По убыванию"
|
msgstr "По убыванию"
|
||||||
|
|
||||||
|
#: rxdconst.srxfieldslookupdisplay
|
||||||
|
msgid "Fields as LookupDisplay"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfillfieldslookupdisp
|
||||||
|
msgid "Fill fields in LookupDisplay property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfillsortfieldsdisp
|
||||||
|
msgid "Fill fields in SortField property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxfilterformapply
|
#: rxdconst.srxfilterformapply
|
||||||
msgid "Apply"
|
msgid "Apply"
|
||||||
msgstr "Применить"
|
msgstr "Применить"
|
||||||
@ -401,6 +417,10 @@ msgstr "&Выбранные поля"
|
|||||||
msgid "Select f&ield for sort data:"
|
msgid "Select f&ield for sort data:"
|
||||||
msgstr "Укажите поля для сортировки данных :"
|
msgstr "Укажите поля для сортировки данных :"
|
||||||
|
|
||||||
|
#: rxdconst.srxsortfieldsdisplay
|
||||||
|
msgid "Fields as SortField"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxsoursedataset
|
#: rxdconst.srxsoursedataset
|
||||||
msgid "Sourse dataset"
|
msgid "Sourse dataset"
|
||||||
msgstr "Исходная таблица"
|
msgstr "Исходная таблица"
|
||||||
|
@ -222,6 +222,10 @@ msgstr "Реєстрація"
|
|||||||
msgid "Retry to connect with database?"
|
msgid "Retry to connect with database?"
|
||||||
msgstr "Ви хочете повторити спробу з'єднання з базою даних?"
|
msgstr "Ви хочете повторити спробу з'єднання з базою даних?"
|
||||||
|
|
||||||
|
#: rxdconst.srxallfields
|
||||||
|
msgid "All fields"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxascendign
|
#: rxdconst.srxascendign
|
||||||
msgid "Ascendign"
|
msgid "Ascendign"
|
||||||
msgstr "По зростанню"
|
msgstr "По зростанню"
|
||||||
@ -325,6 +329,18 @@ msgstr "Сортувати дані по колонках"
|
|||||||
msgid "Descending"
|
msgid "Descending"
|
||||||
msgstr "За зменшенням"
|
msgstr "За зменшенням"
|
||||||
|
|
||||||
|
#: rxdconst.srxfieldslookupdisplay
|
||||||
|
msgid "Fields as LookupDisplay"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfillfieldslookupdisp
|
||||||
|
msgid "Fill fields in LookupDisplay property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
|
#: rxdconst.srxfillsortfieldsdisp
|
||||||
|
msgid "Fill fields in SortField property"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxfilterformapply
|
#: rxdconst.srxfilterformapply
|
||||||
msgid "Apply"
|
msgid "Apply"
|
||||||
msgstr "Застосувати"
|
msgstr "Застосувати"
|
||||||
@ -410,6 +426,10 @@ msgstr "&Вибрані поля"
|
|||||||
msgid "Select f&ield for sort data:"
|
msgid "Select f&ield for sort data:"
|
||||||
msgstr "Вкажіть поля для сортування даних :"
|
msgstr "Вкажіть поля для сортування даних :"
|
||||||
|
|
||||||
|
#: rxdconst.srxsortfieldsdisplay
|
||||||
|
msgid "Fields as SortField"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: rxdconst.srxsoursedataset
|
#: rxdconst.srxsoursedataset
|
||||||
msgid "Sourse dataset"
|
msgid "Sourse dataset"
|
||||||
msgstr "Початкова таблиця"
|
msgstr "Початкова таблиця"
|
||||||
|
@ -4,15 +4,36 @@ unit register_rxctrl;
|
|||||||
|
|
||||||
interface
|
interface
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, LResources, LazarusPackageIntf;
|
Classes, SysUtils, LResources, LazarusPackageIntf, DBPropEdits, PropEdits,
|
||||||
|
DB, ComponentEditors;
|
||||||
|
|
||||||
procedure Register;
|
type
|
||||||
implementation
|
|
||||||
uses RxLogin, ComponentEditors, RxAppIcon, Dialogs, rxconst;
|
|
||||||
|
|
||||||
resourcestring
|
{ TRxCollumsSortFieldsProperty }
|
||||||
sTestTRxLoginDialog = 'Test TRxLoginDialog';
|
|
||||||
sLoadIcon = 'Load icon';
|
TRxCollumsSortFieldsProperty = class(TDBGridFieldProperty)
|
||||||
|
public
|
||||||
|
function GetAttributes: TPropertyAttributes; override;
|
||||||
|
procedure Edit; override;
|
||||||
|
procedure FillValues(const Values: TStringList); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TPopUpColumnFieldProperty }
|
||||||
|
|
||||||
|
TPopUpColumnFieldProperty = class(TFieldProperty)
|
||||||
|
public
|
||||||
|
procedure FillValues(const Values: TStringList); override;
|
||||||
|
end;
|
||||||
|
|
||||||
|
type
|
||||||
|
|
||||||
|
{ THistoryButtonProperty }
|
||||||
|
|
||||||
|
THistoryButtonProperty = class(TStringPropertyEditor)
|
||||||
|
public
|
||||||
|
function GetAttributes: TPropertyAttributes; override;
|
||||||
|
procedure GetValues(Proc: TGetStrProc); override;
|
||||||
|
end;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -41,6 +62,16 @@ type
|
|||||||
procedure ExecuteVerb(Index:integer);override;
|
procedure ExecuteVerb(Index:integer);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure Register;
|
||||||
|
implementation
|
||||||
|
uses RxLogin, RxAppIcon, Dialogs, rxconst, RxHistoryNavigator, rxpopupunit,
|
||||||
|
rxceEditLookupFields, rxdbgrid, rxdconst, duallist, rxstrutils, Forms;
|
||||||
|
|
||||||
|
resourcestring
|
||||||
|
sTestTRxLoginDialog = 'Test TRxLoginDialog';
|
||||||
|
sLoadIcon = 'Load icon';
|
||||||
|
|
||||||
|
|
||||||
{ TRxLoginDialogEditor }
|
{ TRxLoginDialogEditor }
|
||||||
|
|
||||||
constructor TRxLoginDialogEditor.Create(AComponent: TComponent;
|
constructor TRxLoginDialogEditor.Create(AComponent: TComponent;
|
||||||
@ -160,13 +191,148 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ THistoryButtonProperty }
|
||||||
|
|
||||||
|
function THistoryButtonProperty.GetAttributes: TPropertyAttributes;
|
||||||
|
begin
|
||||||
|
Result:= [paValueList, paSortList, paMultiSelect];
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure THistoryButtonProperty.GetValues(Proc: TGetStrProc);
|
||||||
|
var
|
||||||
|
I: Integer;
|
||||||
|
Navigator:TRxHistoryNavigator;
|
||||||
|
begin
|
||||||
|
Navigator:=TRxHistoryNavigator(GetComponent(0));
|
||||||
|
if Assigned(Navigator) then
|
||||||
|
begin
|
||||||
|
if Assigned(Navigator.ToolPanel) then
|
||||||
|
begin
|
||||||
|
for i:=0 to Navigator.ToolPanel.Items.Count - 1 do
|
||||||
|
begin
|
||||||
|
if Assigned(Navigator.ToolPanel.Items[i].Action) then
|
||||||
|
Proc(Navigator.ToolPanel.Items[i].Action.Name);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{ TPopUpColumnFieldProperty }
|
||||||
|
|
||||||
|
procedure TPopUpColumnFieldProperty.FillValues(const Values: TStringList);
|
||||||
|
var
|
||||||
|
Column: TPopUpColumn;
|
||||||
|
DataSource: TDataSource;
|
||||||
|
begin
|
||||||
|
Column:=TPopUpColumn(GetComponent(0));
|
||||||
|
if not (Column is TPopUpColumn) then exit;
|
||||||
|
DataSource := TPopUpFormColumns(Column.Collection).PopUpFormOptions.DataSource;
|
||||||
|
if Assigned(DataSource) and Assigned(DataSource.DataSet) then
|
||||||
|
DataSource.DataSet.GetFieldNames(Values);
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{ TRxCollumsSortFieldsProperty }
|
||||||
|
|
||||||
|
function TRxCollumsSortFieldsProperty.GetAttributes: TPropertyAttributes;
|
||||||
|
begin
|
||||||
|
Result:= [paValueList, paSortList, paMultiSelect, paDialog];
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TRxCollumsSortFieldsProperty.Edit;
|
||||||
|
var
|
||||||
|
DualListDialog1: TDualListDialog;
|
||||||
|
FCol:TRxColumn;
|
||||||
|
/// FGrid:TRxDBGrid;
|
||||||
|
|
||||||
|
procedure DoInitFill;
|
||||||
|
var
|
||||||
|
i,j:integer;
|
||||||
|
LookupDisplay:string;
|
||||||
|
begin
|
||||||
|
LookupDisplay:=FCol.SortFields;
|
||||||
|
if LookupDisplay<>'' then
|
||||||
|
begin
|
||||||
|
StrToStrings(LookupDisplay, DualListDialog1.List2, ';');
|
||||||
|
for i:=DualListDialog1.List1.Count-1 downto 0 do
|
||||||
|
begin
|
||||||
|
j:=DualListDialog1.List2.IndexOf(DualListDialog1.List1[i]);
|
||||||
|
if j>=0 then
|
||||||
|
DualListDialog1.List1.Delete(i);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function DoFillDone:string;
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
begin
|
||||||
|
for i:=0 to DualListDialog1.List2.Count-1 do
|
||||||
|
Result:=Result + DualListDialog1.List2[i]+';';
|
||||||
|
if Result<>'' then
|
||||||
|
Result:=Copy(Result, 1, Length(Result)-1);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure DoSetCaptions;
|
||||||
|
begin
|
||||||
|
DualListDialog1.Label1Caption:=sRxAllFields;
|
||||||
|
DualListDialog1.Label2Caption:=sRxSortFieldsDisplay;
|
||||||
|
DualListDialog1.Title:=sRxFillSortFieldsDisp;
|
||||||
|
end;
|
||||||
|
|
||||||
|
begin
|
||||||
|
FCol:=nil;
|
||||||
|
|
||||||
|
if GetComponent(0) is TRxColumn then
|
||||||
|
FCol:=TRxColumn(GetComponent(0))
|
||||||
|
else
|
||||||
|
exit;
|
||||||
|
|
||||||
|
DualListDialog1:=TDualListDialog.Create(Application);
|
||||||
|
try
|
||||||
|
DoSetCaptions;
|
||||||
|
FillValues(DualListDialog1.List1 as TStringList);
|
||||||
|
DoInitFill;
|
||||||
|
if DualListDialog1.Execute then
|
||||||
|
FCol.SortFields:=DoFillDone;
|
||||||
|
finally
|
||||||
|
FreeAndNil(DualListDialog1);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TRxCollumsSortFieldsProperty.FillValues(const Values: TStringList);
|
||||||
|
var
|
||||||
|
Column: TRxColumn;
|
||||||
|
Grid: TRxDBGrid;
|
||||||
|
DataSource: TDataSource;
|
||||||
|
begin
|
||||||
|
Column:=TRxColumn(GetComponent(0));
|
||||||
|
if not (Column is TRxColumn) then exit;
|
||||||
|
Grid:=TRxDBGrid(Column.Grid);
|
||||||
|
if not (Grid is TRxDBGrid) then exit;
|
||||||
|
// LoadDataSourceFields(Grid.DataSource, Values);
|
||||||
|
|
||||||
|
DataSource := Grid.DataSource;
|
||||||
|
if (DataSource is TDataSource) and Assigned(DataSource.DataSet) then
|
||||||
|
DataSource.DataSet.GetFieldNames(Values);
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure Register;
|
procedure Register;
|
||||||
begin
|
begin
|
||||||
//
|
//
|
||||||
RegisterComponentEditor(TRxLoginDialog, TRxLoginDialogEditor);
|
RegisterComponentEditor(TRxLoginDialog, TRxLoginDialogEditor);
|
||||||
RegisterComponentEditor(TRxAppIcon, TRxAppIconEditor);
|
RegisterComponentEditor(TRxAppIcon, TRxAppIconEditor);
|
||||||
end;
|
//
|
||||||
|
RegisterPropertyEditor(TypeInfo(string), TPopUpColumn, 'FieldName', TPopUpColumnFieldProperty);
|
||||||
|
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'BackBtn', THistoryButtonProperty);
|
||||||
|
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'ForwardBtn', THistoryButtonProperty);
|
||||||
|
|
||||||
|
RegisterPropertyEditor(TypeInfo(string), TRxColumn, 'SortFields', TRxCollumsSortFieldsProperty);
|
||||||
|
|
||||||
|
RegisterCEEditLookupFields;
|
||||||
|
//
|
||||||
|
end;
|
||||||
end.
|
end.
|
||||||
|
|
||||||
|
@ -49,71 +49,9 @@ uses
|
|||||||
curredit, rxswitch, rxdice, rxtoolbar, rxxpman, PageMngr, RxAppIcon,
|
curredit, rxswitch, rxdice, rxtoolbar, rxxpman, PageMngr, RxAppIcon,
|
||||||
Dialogs, ComponentEditors, DBPropEdits, DB, rxctrls,
|
Dialogs, ComponentEditors, DBPropEdits, DB, rxctrls,
|
||||||
RxCustomChartPanel, AutoPanel, pickdate, rxconst, tooledit, rxclock,
|
RxCustomChartPanel, AutoPanel, pickdate, rxconst, tooledit, rxclock,
|
||||||
rxceEditLookupFields, rxpopupunit, rxspin, RxTimeEdit,
|
rxpopupunit, rxspin, RxTimeEdit,
|
||||||
RxAboutDialog, RxViewsPanel, RxMDI;
|
RxAboutDialog, RxViewsPanel, RxMDI;
|
||||||
|
|
||||||
type
|
|
||||||
|
|
||||||
|
|
||||||
{ TPopUpColumnFieldProperty }
|
|
||||||
|
|
||||||
TPopUpColumnFieldProperty = class(TFieldProperty)
|
|
||||||
public
|
|
||||||
procedure FillValues(const Values: TStringList); override;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ TPopUpColumnFieldProperty }
|
|
||||||
|
|
||||||
procedure TPopUpColumnFieldProperty.FillValues(const Values: TStringList);
|
|
||||||
var
|
|
||||||
Column: TPopUpColumn;
|
|
||||||
DataSource: TDataSource;
|
|
||||||
begin
|
|
||||||
Column:=TPopUpColumn(GetComponent(0));
|
|
||||||
if not (Column is TPopUpColumn) then exit;
|
|
||||||
DataSource := TPopUpFormColumns(Column.Collection).PopUpFormOptions.DataSource;
|
|
||||||
if Assigned(DataSource) and Assigned(DataSource.DataSet) then
|
|
||||||
DataSource.DataSet.GetFieldNames(Values);
|
|
||||||
end;
|
|
||||||
|
|
||||||
type
|
|
||||||
|
|
||||||
{ THistoryButtonProperty }
|
|
||||||
|
|
||||||
THistoryButtonProperty = class(TStringPropertyEditor)
|
|
||||||
public
|
|
||||||
function GetAttributes: TPropertyAttributes; override;
|
|
||||||
procedure GetValues(Proc: TGetStrProc); override;
|
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
{ THistoryButtonProperty }
|
|
||||||
|
|
||||||
function THistoryButtonProperty.GetAttributes: TPropertyAttributes;
|
|
||||||
begin
|
|
||||||
Result:= [paValueList, paSortList, paMultiSelect];
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure THistoryButtonProperty.GetValues(Proc: TGetStrProc);
|
|
||||||
var
|
|
||||||
I: Integer;
|
|
||||||
Navigator:TRxHistoryNavigator;
|
|
||||||
begin
|
|
||||||
Navigator:=TRxHistoryNavigator(GetComponent(0));
|
|
||||||
if Assigned(Navigator) then
|
|
||||||
begin
|
|
||||||
if Assigned(Navigator.ToolPanel) then
|
|
||||||
begin
|
|
||||||
for i:=0 to Navigator.ToolPanel.Items.Count - 1 do
|
|
||||||
begin
|
|
||||||
if Assigned(Navigator.ToolPanel.Items[i].Action) then
|
|
||||||
Proc(Navigator.ToolPanel.Items[i].Action.Name);
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
end;
|
|
||||||
|
|
||||||
{$IFDEF USE_TRxAppIcon}
|
{$IFDEF USE_TRxAppIcon}
|
||||||
procedure RegisterRxAppIcon;
|
procedure RegisterRxAppIcon;
|
||||||
begin
|
begin
|
||||||
@ -252,14 +190,6 @@ begin
|
|||||||
RegisterUnit('RxViewsPanel', @RegisterRxViewsPanel);
|
RegisterUnit('RxViewsPanel', @RegisterRxViewsPanel);
|
||||||
RegisterUnit('RxHistoryNavigator', @RegisterRxHistoryNavigator);
|
RegisterUnit('RxHistoryNavigator', @RegisterRxHistoryNavigator);
|
||||||
RegisterUnit('RxMDI', @RegisterRxMDI);
|
RegisterUnit('RxMDI', @RegisterRxMDI);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
RegisterPropertyEditor(TypeInfo(string), TPopUpColumn, 'FieldName', TPopUpColumnFieldProperty);
|
|
||||||
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'BackBtn', THistoryButtonProperty);
|
|
||||||
RegisterPropertyEditor(TypeInfo(string), TRxHistoryNavigator, 'ForwardBtn', THistoryButtonProperty);
|
|
||||||
RegisterCEEditLookupFields;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -61,7 +61,7 @@ procedure RegisterCEEditLookupFields;
|
|||||||
implementation
|
implementation
|
||||||
uses
|
uses
|
||||||
//
|
//
|
||||||
db, duallist, Forms, rxstrutils, TypInfo,
|
db, duallist, Forms, rxstrutils, TypInfo, rxdconst,
|
||||||
//unit for edits
|
//unit for edits
|
||||||
rxlookup;
|
rxlookup;
|
||||||
|
|
||||||
@ -150,9 +150,9 @@ end;
|
|||||||
|
|
||||||
procedure DoSetCaptions;
|
procedure DoSetCaptions;
|
||||||
begin
|
begin
|
||||||
DualListDialog1.Label1Caption:='All fields';
|
DualListDialog1.Label1Caption:=sRxAllFields;
|
||||||
DualListDialog1.Label2Caption:='Fields is LookupDisplay';
|
DualListDialog1.Label2Caption:=sRxFieldsLookupDisplay;
|
||||||
DualListDialog1.Title:='Fill fields in LookupDisplay property';
|
DualListDialog1.Title:=sRxFillFieldsLookupDisp;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
|
@ -209,7 +209,7 @@ type
|
|||||||
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);virtual; abstract;
|
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);virtual; abstract;
|
||||||
function EnabledFooterRowsCalc:boolean;virtual;
|
function EnabledFooterRowsCalc:boolean;virtual;
|
||||||
public
|
public
|
||||||
procedure Sort(Field: TField; ADataSet: TDataSet; Asc: boolean; SortOptions: TRxSortEngineOptions); virtual; abstract;
|
procedure Sort(FieldName: string; ADataSet: TDataSet; Asc: boolean; SortOptions: TRxSortEngineOptions); virtual; abstract;
|
||||||
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); virtual;
|
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); virtual;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -416,12 +416,14 @@ type
|
|||||||
FKeyList: TStrings;
|
FKeyList: TStrings;
|
||||||
FNotInKeyListIndex: integer;
|
FNotInKeyListIndex: integer;
|
||||||
FOnDrawColumnCell: TDrawColumnCellEvent;
|
FOnDrawColumnCell: TDrawColumnCellEvent;
|
||||||
|
FSortFields: string;
|
||||||
FSortOrder: TSortMarker;
|
FSortOrder: TSortMarker;
|
||||||
FSortPosition: integer;
|
FSortPosition: integer;
|
||||||
FWordWrap: boolean;
|
FWordWrap: boolean;
|
||||||
function GetConstraints: TRxDBGridCollumnConstraints;
|
function GetConstraints: TRxDBGridCollumnConstraints;
|
||||||
function GetFooter: TRxColumnFooter;
|
function GetFooter: TRxColumnFooter;
|
||||||
function GetKeyList: TStrings;
|
function GetKeyList: TStrings;
|
||||||
|
function GetSortFields:string;
|
||||||
procedure SetConstraints(AValue: TRxDBGridCollumnConstraints);
|
procedure SetConstraints(AValue: TRxDBGridCollumnConstraints);
|
||||||
procedure SetEditButtons(AValue: TRxColumnEditButtons);
|
procedure SetEditButtons(AValue: TRxColumnEditButtons);
|
||||||
procedure SetFilter(const AValue: TRxColumnFilter);
|
procedure SetFilter(const AValue: TRxColumnFilter);
|
||||||
@ -440,6 +442,7 @@ type
|
|||||||
property SortOrder: TSortMarker read FSortOrder write FSortOrder;
|
property SortOrder: TSortMarker read FSortOrder write FSortOrder;
|
||||||
property SortPosition: integer read FSortPosition;
|
property SortPosition: integer read FSortPosition;
|
||||||
published
|
published
|
||||||
|
property SortFields: string read FSortFields write FSortFields;
|
||||||
property Footer: TRxColumnFooter read GetFooter write SetFooter;
|
property Footer: TRxColumnFooter read GetFooter write SetFooter;
|
||||||
property Constraints:TRxDBGridCollumnConstraints read GetConstraints write SetConstraints;
|
property Constraints:TRxDBGridCollumnConstraints read GetConstraints write SetConstraints;
|
||||||
property ImageList: TImageList read FImageList write SetImageList;
|
property ImageList: TImageList read FImageList write SetImageList;
|
||||||
@ -1871,7 +1874,7 @@ end;
|
|||||||
function TRxDBGrid.GetSortField: string;
|
function TRxDBGrid.GetSortField: string;
|
||||||
begin
|
begin
|
||||||
if FSortColumns.Count > 0 then
|
if FSortColumns.Count > 0 then
|
||||||
Result:=FSortColumns[0].FieldName
|
Result:=FSortColumns[0].GetSortFields
|
||||||
else
|
else
|
||||||
Result:='';
|
Result:='';
|
||||||
end;
|
end;
|
||||||
@ -2584,13 +2587,13 @@ begin
|
|||||||
Asc[i]:=FSortColumns[i].FSortOrder = smUp;
|
Asc[i]:=FSortColumns[i].FSortOrder = smUp;
|
||||||
if S<>'' then
|
if S<>'' then
|
||||||
S:=S+';';
|
S:=S+';';
|
||||||
S:=S + FSortColumns[i].FieldName;
|
S:=S + FSortColumns[i].GetSortFields;
|
||||||
end;
|
end;
|
||||||
{ TODO : Необходимо добавить опцию регистронезависимого поиска }
|
{ TODO : Необходимо добавить опцию регистронезависимого поиска }
|
||||||
FSortEngine.SortList(S, DataSource.DataSet, Asc, SortEngineOptions);
|
FSortEngine.SortList(S, DataSource.DataSet, Asc, SortEngineOptions);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
FSortEngine.Sort(FSortColumns[0].Field, DataSource.DataSet, FSortColumns[0].FSortOrder = smUp, SortEngineOptions);
|
FSortEngine.Sort(FSortColumns[0].GetSortFields, DataSource.DataSet, FSortColumns[0].FSortOrder = smUp, SortEngineOptions);
|
||||||
FSortingNow:=false;
|
FSortingNow:=false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -4872,6 +4875,14 @@ begin
|
|||||||
Result := FKeyList;
|
Result := FKeyList;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRxColumn.GetSortFields: string;
|
||||||
|
begin
|
||||||
|
if FSortFields = '' then
|
||||||
|
Result:=FieldName
|
||||||
|
else
|
||||||
|
Result:=FSortFields;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRxColumn.SetConstraints(AValue: TRxDBGridCollumnConstraints);
|
procedure TRxColumn.SetConstraints(AValue: TRxDBGridCollumnConstraints);
|
||||||
begin
|
begin
|
||||||
FConstraints.Assign(AValue);
|
FConstraints.Assign(AValue);
|
||||||
|
@ -92,6 +92,11 @@ resourcestring
|
|||||||
SCircularDataLink = 'SCircularDataLink';
|
SCircularDataLink = 'SCircularDataLink';
|
||||||
sRxAscendign = 'Ascendign';
|
sRxAscendign = 'Ascendign';
|
||||||
sRxDescending = 'Descending';
|
sRxDescending = 'Descending';
|
||||||
|
sRxAllFields = 'All fields';
|
||||||
|
sRxFieldsLookupDisplay = 'Fields as LookupDisplay';
|
||||||
|
sRxFillFieldsLookupDisp = 'Fill fields in LookupDisplay property';
|
||||||
|
sRxSortFieldsDisplay = 'Fields as SortField';
|
||||||
|
sRxFillSortFieldsDisp = 'Fill fields in SortField property';
|
||||||
|
|
||||||
|
|
||||||
SDeleteRecordQuestion = 'Delete record?';
|
SDeleteRecordQuestion = 'Delete record?';
|
||||||
|
@ -26,8 +26,8 @@ Copyright (c) 1998 Master-Bank
|
|||||||
translate to Lazarus by alexs in 2005 - 2014
|
translate to Lazarus by alexs in 2005 - 2014
|
||||||
"/>
|
"/>
|
||||||
<License Value="LGPL"/>
|
<License Value="LGPL"/>
|
||||||
<Version Major="2" Minor="6" Release="3" Build="140"/>
|
<Version Major="2" Minor="6" Release="4" Build="142"/>
|
||||||
<Files Count="68">
|
<Files Count="67">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="autopanel.pas"/>
|
<Filename Value="autopanel.pas"/>
|
||||||
<UnitName Value="AutoPanel"/>
|
<UnitName Value="AutoPanel"/>
|
||||||
@ -116,193 +116,189 @@ translate to Lazarus by alexs in 2005 - 2014
|
|||||||
<UnitName Value="rxapputils"/>
|
<UnitName Value="rxapputils"/>
|
||||||
</Item21>
|
</Item21>
|
||||||
<Item22>
|
<Item22>
|
||||||
<Filename Value="rxceeditlookupfields.pas"/>
|
|
||||||
<UnitName Value="rxceEditLookupFields"/>
|
|
||||||
</Item22>
|
|
||||||
<Item23>
|
|
||||||
<Filename Value="rxclock.pas"/>
|
<Filename Value="rxclock.pas"/>
|
||||||
<UnitName Value="rxclock"/>
|
<UnitName Value="rxclock"/>
|
||||||
</Item23>
|
</Item22>
|
||||||
<Item24>
|
<Item23>
|
||||||
<Filename Value="rxconfigvalues.pas"/>
|
<Filename Value="rxconfigvalues.pas"/>
|
||||||
<UnitName Value="rxConfigValues"/>
|
<UnitName Value="rxConfigValues"/>
|
||||||
</Item24>
|
</Item23>
|
||||||
<Item25>
|
<Item24>
|
||||||
<Filename Value="rxconst.pas"/>
|
<Filename Value="rxconst.pas"/>
|
||||||
<UnitName Value="rxconst"/>
|
<UnitName Value="rxconst"/>
|
||||||
</Item25>
|
</Item24>
|
||||||
<Item26>
|
<Item25>
|
||||||
<Filename Value="rxctrls.pas"/>
|
<Filename Value="rxctrls.pas"/>
|
||||||
<UnitName Value="rxctrls"/>
|
<UnitName Value="rxctrls"/>
|
||||||
</Item26>
|
</Item25>
|
||||||
<Item27>
|
<Item26>
|
||||||
<Filename Value="rxcustomchartpanel.pas"/>
|
<Filename Value="rxcustomchartpanel.pas"/>
|
||||||
<UnitName Value="rxcustomchartpanel"/>
|
<UnitName Value="rxcustomchartpanel"/>
|
||||||
</Item27>
|
</Item26>
|
||||||
<Item28>
|
<Item27>
|
||||||
<Filename Value="rxdbcolorbox.pas"/>
|
<Filename Value="rxdbcolorbox.pas"/>
|
||||||
<UnitName Value="RxDBColorBox"/>
|
<UnitName Value="RxDBColorBox"/>
|
||||||
</Item28>
|
</Item27>
|
||||||
<Item29>
|
<Item28>
|
||||||
<Filename Value="rxdbcomb.pas"/>
|
<Filename Value="rxdbcomb.pas"/>
|
||||||
<UnitName Value="rxdbcomb"/>
|
<UnitName Value="rxdbcomb"/>
|
||||||
</Item29>
|
</Item28>
|
||||||
<Item30>
|
<Item29>
|
||||||
<Filename Value="rxdbctrls.pas"/>
|
<Filename Value="rxdbctrls.pas"/>
|
||||||
<UnitName Value="RxDBCtrls"/>
|
<UnitName Value="RxDBCtrls"/>
|
||||||
</Item30>
|
</Item29>
|
||||||
<Item31>
|
<Item30>
|
||||||
<Filename Value="rxdbgrid.pas"/>
|
<Filename Value="rxdbgrid.pas"/>
|
||||||
<UnitName Value="rxdbgrid"/>
|
<UnitName Value="rxdbgrid"/>
|
||||||
</Item31>
|
</Item30>
|
||||||
<Item32>
|
<Item31>
|
||||||
<Filename Value="rxdbgrid.lrs"/>
|
<Filename Value="rxdbgrid.lrs"/>
|
||||||
<Type Value="LRS"/>
|
<Type Value="LRS"/>
|
||||||
</Item32>
|
</Item31>
|
||||||
<Item33>
|
<Item32>
|
||||||
<Filename Value="rxdbgrid_columsunit.pas"/>
|
<Filename Value="rxdbgrid_columsunit.pas"/>
|
||||||
<UnitName Value="rxdbgrid_columsunit"/>
|
<UnitName Value="rxdbgrid_columsunit"/>
|
||||||
</Item33>
|
</Item32>
|
||||||
<Item34>
|
<Item33>
|
||||||
<Filename Value="rxdbgrid_findunit.pas"/>
|
<Filename Value="rxdbgrid_findunit.pas"/>
|
||||||
<UnitName Value="rxdbgrid_findunit"/>
|
<UnitName Value="rxdbgrid_findunit"/>
|
||||||
</Item34>
|
</Item33>
|
||||||
<Item35>
|
<Item34>
|
||||||
<Filename Value="rxdbspinedit.pas"/>
|
<Filename Value="rxdbspinedit.pas"/>
|
||||||
<UnitName Value="RxDBSpinEdit"/>
|
<UnitName Value="RxDBSpinEdit"/>
|
||||||
</Item35>
|
</Item34>
|
||||||
<Item36>
|
<Item35>
|
||||||
<Filename Value="rxdbtimeedit.pas"/>
|
<Filename Value="rxdbtimeedit.pas"/>
|
||||||
<UnitName Value="RxDBTimeEdit"/>
|
<UnitName Value="RxDBTimeEdit"/>
|
||||||
</Item36>
|
</Item35>
|
||||||
<Item37>
|
<Item36>
|
||||||
<Filename Value="rxdconst.pas"/>
|
<Filename Value="rxdconst.pas"/>
|
||||||
<UnitName Value="rxdconst"/>
|
<UnitName Value="rxdconst"/>
|
||||||
</Item37>
|
</Item36>
|
||||||
<Item38>
|
<Item37>
|
||||||
<Filename Value="rxdice.pas"/>
|
<Filename Value="rxdice.pas"/>
|
||||||
<UnitName Value="rxdice"/>
|
<UnitName Value="rxdice"/>
|
||||||
</Item38>
|
</Item37>
|
||||||
<Item39>
|
<Item38>
|
||||||
<Filename Value="rxfileutils.pas"/>
|
<Filename Value="rxfileutils.pas"/>
|
||||||
<UnitName Value="rxFileUtils"/>
|
<UnitName Value="rxFileUtils"/>
|
||||||
</Item39>
|
</Item38>
|
||||||
<Item40>
|
<Item39>
|
||||||
<Filename Value="rxfilterby.pas"/>
|
<Filename Value="rxfilterby.pas"/>
|
||||||
<UnitName Value="rxfilterby"/>
|
<UnitName Value="rxfilterby"/>
|
||||||
</Item40>
|
</Item39>
|
||||||
<Item41>
|
<Item40>
|
||||||
<Filename Value="rxiconv.pas"/>
|
<Filename Value="rxiconv.pas"/>
|
||||||
<UnitName Value="rxiconv"/>
|
<UnitName Value="rxiconv"/>
|
||||||
</Item41>
|
</Item40>
|
||||||
<Item42>
|
<Item41>
|
||||||
<Filename Value="rxlogin.pas"/>
|
<Filename Value="rxlogin.pas"/>
|
||||||
<UnitName Value="rxlogin"/>
|
<UnitName Value="rxlogin"/>
|
||||||
</Item42>
|
</Item41>
|
||||||
<Item43>
|
<Item42>
|
||||||
<Filename Value="rxlookup.pas"/>
|
<Filename Value="rxlookup.pas"/>
|
||||||
<UnitName Value="rxlookup"/>
|
<UnitName Value="rxlookup"/>
|
||||||
</Item43>
|
</Item42>
|
||||||
<Item44>
|
<Item43>
|
||||||
<Filename Value="rxmemds.pas"/>
|
<Filename Value="rxmemds.pas"/>
|
||||||
<UnitName Value="rxmemds"/>
|
<UnitName Value="rxmemds"/>
|
||||||
</Item44>
|
</Item43>
|
||||||
<Item45>
|
<Item44>
|
||||||
<Filename Value="rxpopupunit.pas"/>
|
<Filename Value="rxpopupunit.pas"/>
|
||||||
<UnitName Value="rxpopupunit"/>
|
<UnitName Value="rxpopupunit"/>
|
||||||
</Item45>
|
</Item44>
|
||||||
<Item46>
|
<Item45>
|
||||||
<Filename Value="rxsortmemds.pas"/>
|
<Filename Value="rxsortmemds.pas"/>
|
||||||
<UnitName Value="rxsortmemds"/>
|
<UnitName Value="rxsortmemds"/>
|
||||||
</Item46>
|
</Item45>
|
||||||
<Item47>
|
<Item46>
|
||||||
<Filename Value="rxspin.pas"/>
|
<Filename Value="rxspin.pas"/>
|
||||||
<UnitName Value="rxspin"/>
|
<UnitName Value="rxspin"/>
|
||||||
</Item47>
|
</Item46>
|
||||||
<Item48>
|
<Item47>
|
||||||
<Filename Value="rxstrutils.pas"/>
|
<Filename Value="rxstrutils.pas"/>
|
||||||
<UnitName Value="rxstrutils"/>
|
<UnitName Value="rxstrutils"/>
|
||||||
</Item48>
|
</Item47>
|
||||||
<Item49>
|
<Item48>
|
||||||
<Filename Value="rxswitch.pas"/>
|
<Filename Value="rxswitch.pas"/>
|
||||||
<UnitName Value="rxswitch"/>
|
<UnitName Value="rxswitch"/>
|
||||||
</Item49>
|
</Item48>
|
||||||
<Item50>
|
<Item49>
|
||||||
<Filename Value="rxsystemservices.pas"/>
|
<Filename Value="rxsystemservices.pas"/>
|
||||||
<UnitName Value="RxSystemServices"/>
|
<UnitName Value="RxSystemServices"/>
|
||||||
</Item50>
|
</Item49>
|
||||||
<Item51>
|
<Item50>
|
||||||
<Filename Value="rxtbrsetup.pas"/>
|
<Filename Value="rxtbrsetup.pas"/>
|
||||||
<UnitName Value="rxtbrsetup"/>
|
<UnitName Value="rxtbrsetup"/>
|
||||||
</Item51>
|
</Item50>
|
||||||
<Item52>
|
<Item51>
|
||||||
<Filename Value="rxtimeedit.pas"/>
|
<Filename Value="rxtimeedit.pas"/>
|
||||||
<UnitName Value="RxTimeEdit"/>
|
<UnitName Value="RxTimeEdit"/>
|
||||||
</Item52>
|
</Item51>
|
||||||
<Item53>
|
<Item52>
|
||||||
<Filename Value="rxtoolbar.pas"/>
|
<Filename Value="rxtoolbar.pas"/>
|
||||||
<UnitName Value="rxtoolbar"/>
|
<UnitName Value="rxtoolbar"/>
|
||||||
</Item53>
|
</Item52>
|
||||||
<Item54>
|
<Item53>
|
||||||
<Filename Value="rxversinfo.pas"/>
|
<Filename Value="rxversinfo.pas"/>
|
||||||
<UnitName Value="RxVersInfo"/>
|
<UnitName Value="RxVersInfo"/>
|
||||||
</Item54>
|
</Item53>
|
||||||
<Item55>
|
<Item54>
|
||||||
<Filename Value="rxviewspanel.pas"/>
|
<Filename Value="rxviewspanel.pas"/>
|
||||||
<UnitName Value="RxViewsPanel"/>
|
<UnitName Value="RxViewsPanel"/>
|
||||||
</Item55>
|
</Item54>
|
||||||
<Item56>
|
<Item55>
|
||||||
<Filename Value="rxxpman.pas"/>
|
<Filename Value="rxxpman.pas"/>
|
||||||
<UnitName Value="rxxpman"/>
|
<UnitName Value="rxxpman"/>
|
||||||
</Item56>
|
</Item55>
|
||||||
<Item57>
|
<Item56>
|
||||||
<Filename Value="seldsfrm.pas"/>
|
<Filename Value="seldsfrm.pas"/>
|
||||||
<UnitName Value="seldsfrm"/>
|
<UnitName Value="seldsfrm"/>
|
||||||
</Item57>
|
</Item56>
|
||||||
<Item58>
|
<Item57>
|
||||||
<Filename Value="tooledit.pas"/>
|
<Filename Value="tooledit.pas"/>
|
||||||
<UnitName Value="tooledit"/>
|
<UnitName Value="tooledit"/>
|
||||||
</Item58>
|
</Item57>
|
||||||
<Item59>
|
<Item58>
|
||||||
<Filename Value="vclutils.pas"/>
|
<Filename Value="vclutils.pas"/>
|
||||||
<UnitName Value="vclutils"/>
|
<UnitName Value="vclutils"/>
|
||||||
</Item59>
|
</Item58>
|
||||||
<Item60>
|
<Item59>
|
||||||
<Filename Value="rxcloseformvalidator.pas"/>
|
<Filename Value="rxcloseformvalidator.pas"/>
|
||||||
<UnitName Value="RxCloseFormValidator"/>
|
<UnitName Value="RxCloseFormValidator"/>
|
||||||
</Item60>
|
</Item59>
|
||||||
<Item61>
|
<Item60>
|
||||||
<Filename Value="rxhistorynavigator.pas"/>
|
<Filename Value="rxhistorynavigator.pas"/>
|
||||||
<UnitName Value="RxHistoryNavigator"/>
|
<UnitName Value="RxHistoryNavigator"/>
|
||||||
</Item61>
|
</Item60>
|
||||||
<Item62>
|
<Item61>
|
||||||
<Filename Value="ex_rx_bin_datapacket.pas"/>
|
<Filename Value="ex_rx_bin_datapacket.pas"/>
|
||||||
<UnitName Value="ex_rx_bin_datapacket"/>
|
<UnitName Value="ex_rx_bin_datapacket"/>
|
||||||
</Item62>
|
</Item61>
|
||||||
<Item63>
|
<Item62>
|
||||||
<Filename Value="ex_rx_datapacket.pas"/>
|
<Filename Value="ex_rx_datapacket.pas"/>
|
||||||
<UnitName Value="ex_rx_datapacket"/>
|
<UnitName Value="ex_rx_datapacket"/>
|
||||||
</Item63>
|
</Item62>
|
||||||
<Item64>
|
<Item63>
|
||||||
<Filename Value="ex_rx_xml_datapacket.pas"/>
|
<Filename Value="ex_rx_xml_datapacket.pas"/>
|
||||||
<UnitName Value="ex_rx_xml_datapacket"/>
|
<UnitName Value="ex_rx_xml_datapacket"/>
|
||||||
</Item64>
|
</Item63>
|
||||||
<Item65>
|
<Item64>
|
||||||
<Filename Value="rxsortby.lfm"/>
|
<Filename Value="rxsortby.lfm"/>
|
||||||
<Type Value="LFM"/>
|
<Type Value="LFM"/>
|
||||||
</Item65>
|
</Item64>
|
||||||
<Item66>
|
<Item65>
|
||||||
<Filename Value="rxsortby.pas"/>
|
<Filename Value="rxsortby.pas"/>
|
||||||
<UnitName Value="rxsortby"/>
|
<UnitName Value="rxsortby"/>
|
||||||
</Item66>
|
</Item65>
|
||||||
<Item67>
|
<Item66>
|
||||||
<Filename Value="rxmdi.pas"/>
|
<Filename Value="rxmdi.pas"/>
|
||||||
<UnitName Value="RxMDI"/>
|
<UnitName Value="RxMDI"/>
|
||||||
</Item67>
|
</Item66>
|
||||||
<Item68>
|
<Item67>
|
||||||
<Filename Value="rxinipropstorage.pas"/>
|
<Filename Value="rxinipropstorage.pas"/>
|
||||||
<UnitName Value="RxIniPropStorage"/>
|
<UnitName Value="RxIniPropStorage"/>
|
||||||
</Item68>
|
</Item67>
|
||||||
</Files>
|
</Files>
|
||||||
<LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/>
|
<LazDoc Paths="docs;\usr\local\share\lazarus\components\rxnew\docs"/>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
@ -10,15 +10,15 @@ uses
|
|||||||
AutoPanel, boxprocs, curredit, dateutil, dbcurredit, dbdateedit, dbutils,
|
AutoPanel, boxprocs, curredit, dateutil, dbcurredit, dbdateedit, dbutils,
|
||||||
duallist, fduallst, folderlister, pagemngr, pickdate, registerrx,
|
duallist, fduallst, folderlister, pagemngr, pickdate, registerrx,
|
||||||
RegisterRxDB, RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxappicon,
|
RegisterRxDB, RegisterRxTools, RxAboutDialog, rxAboutFormUnit, rxappicon,
|
||||||
rxapputils, rxceEditLookupFields, rxclock, rxConfigValues, rxconst, rxctrls,
|
rxapputils, rxclock, rxConfigValues, rxconst, rxctrls, rxcustomchartpanel,
|
||||||
rxcustomchartpanel, RxDBColorBox, rxdbcomb, RxDBCtrls, rxdbgrid,
|
RxDBColorBox, rxdbcomb, RxDBCtrls, rxdbgrid, rxdbgrid_columsunit,
|
||||||
rxdbgrid_columsunit, rxdbgrid_findunit, RxDBSpinEdit, RxDBTimeEdit,
|
rxdbgrid_findunit, RxDBSpinEdit, RxDBTimeEdit, rxdconst, rxdice,
|
||||||
rxdconst, rxdice, rxFileUtils, rxfilterby, rxiconv, rxlogin, rxlookup,
|
rxFileUtils, rxfilterby, rxiconv, rxlogin, rxlookup, rxmemds, rxpopupunit,
|
||||||
rxmemds, rxpopupunit, rxsortmemds, rxspin, rxstrutils, rxswitch,
|
rxsortmemds, rxspin, rxstrutils, rxswitch, RxSystemServices, rxtbrsetup,
|
||||||
RxSystemServices, rxtbrsetup, RxTimeEdit, rxtoolbar, RxVersInfo,
|
RxTimeEdit, rxtoolbar, RxVersInfo, RxViewsPanel, rxxpman, seldsfrm,
|
||||||
RxViewsPanel, rxxpman, seldsfrm, tooledit, vclutils, RxCloseFormValidator,
|
tooledit, vclutils, RxCloseFormValidator, RxHistoryNavigator,
|
||||||
RxHistoryNavigator, ex_rx_bin_datapacket, ex_rx_datapacket,
|
ex_rx_bin_datapacket, ex_rx_datapacket, ex_rx_xml_datapacket, rxsortby,
|
||||||
ex_rx_xml_datapacket, rxsortby, RxMDI, RxIniPropStorage, LazarusPackageIntf;
|
RxMDI, RxIniPropStorage, LazarusPackageIntf;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ type
|
|||||||
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
procedure UpdateFooterRows(ADataSet:TDataSet; AGrid:TRxDBGrid);override;
|
||||||
function EnabledFooterRowsCalc:boolean;override;
|
function EnabledFooterRowsCalc:boolean;override;
|
||||||
public
|
public
|
||||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
procedure Sort(FieldName: string; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||||
procedure SortList(ListField:string; ADataSet:TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);override;
|
procedure SortList(ListField:string; ADataSet:TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -116,11 +116,11 @@ begin
|
|||||||
Result:=true;
|
Result:=true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxMemoryDataSortEngine.Sort(Field:TField; ADataSet:TDataSet;
|
procedure TRxMemoryDataSortEngine.Sort(FieldName: string; ADataSet: TDataSet;
|
||||||
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
Asc: boolean; SortOptions: TRxSortEngineOptions);
|
||||||
begin
|
begin
|
||||||
if Assigned(ADataSet) then
|
if Assigned(ADataSet) then
|
||||||
(ADataSet as TRxMemoryData).SortOnFields(Field.FieldName, seoCaseInsensitiveSort in SortOptions, not Asc);
|
(ADataSet as TRxMemoryData).SortOnFields(FieldName, seoCaseInsensitiveSort in SortOptions, not Asc);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxMemoryDataSortEngine.SortList(ListField: string;
|
procedure TRxMemoryDataSortEngine.SortList(ListField: string;
|
||||||
|
@ -597,15 +597,6 @@ begin
|
|||||||
|
|
||||||
ABounds := Screen.MonitorFromPoint(P).BoundsRect;
|
ABounds := Screen.MonitorFromPoint(P).BoundsRect;
|
||||||
|
|
||||||
{ if PopupOrigin.X + Width > ABounds.Right then
|
|
||||||
Left := ABounds.Right - Width
|
|
||||||
else
|
|
||||||
Left := PopupOrigin.X;
|
|
||||||
if PopupOrigin.Y + Height > ABounds.Bottom then
|
|
||||||
Top := ABounds.Bottom - Height
|
|
||||||
else
|
|
||||||
Top := PopupOrigin.Y;}
|
|
||||||
|
|
||||||
Y := P.Y + Height;
|
Y := P.Y + Height;
|
||||||
if Y + FPopup.Height > ABounds.Right then
|
if Y + FPopup.Height > ABounds.Right then
|
||||||
Y := P.Y - FPopup.Height;
|
Y := P.Y - FPopup.Height;
|
||||||
|
Reference in New Issue
Block a user