From c0c0360d424dbee5796fe457ec85bcba457d6357 Mon Sep 17 00:00:00 2001 From: alexs75 Date: Thu, 6 Aug 2009 16:59:07 +0000 Subject: [PATCH] new code for sorting, filter and etc... git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@926 8e941d3f-bd1b-0410-a28a-d453659cc2b4 --- components/rx/docs/WhatsNew.eng.txt | 9 +- components/rx/docs/WhatsNew.rus.txt | 11 +- components/rx/exsortfb.pas | 30 + components/rx/exsortzeos.pas | 20 +- components/rx/languages/register_rxctrl.po | 11 + components/rx/languages/rxconst.po | 55 ++ components/rx/languages/rxdconst.es.po | 395 +++++++++++ components/rx/languages/rxdconst.po | 395 +++++++++++ components/rx/languages/rxdconst.ru.po | 395 +++++++++++ components/rx/languages/rxmemds.po | 11 + components/rx/pickdate.pas | 13 +- components/rx/rxdbgrid.lrs | 12 + components/rx/rxdbgrid.pas | 697 +++++++++++++++++- components/rx/rxdbgrid_columsunit.lfm | 213 +++--- components/rx/rxdbgrid_columsunit.lrs | 117 +++- components/rx/rxdbgrid_columsunit.lrt | 1 + components/rx/rxdbgrid_columsunit.pas | 18 +- components/rx/rxdbgrid_findunit.lfm | 147 ++-- components/rx/rxdbgrid_findunit.lrs | 104 +-- components/rx/rxdbgrid_findunit.pas | 19 +- components/rx/rxdconst.pas | 253 +++---- components/rx/rxfilterby.lfm | 775 +++++++++++++++++++++ components/rx/rxfilterby.lrs | 261 +++++++ components/rx/rxfilterby.lrt | 10 + components/rx/rxfilterby.pas | 349 ++++++++++ components/rx/rxlookup.pas | 176 ++++- components/rx/rxmemds.pas | 4 - components/rx/rxnew.lpk | 18 +- components/rx/rxnew.pas | 2 +- components/rx/rxpopupunit.pas | 88 ++- components/rx/rxsortby.lfm | 241 +++++++ components/rx/rxsortby.lrs | 112 +++ components/rx/rxsortby.lrt | 10 + components/rx/rxsortby.pas | 190 +++++ components/rx/rxtoolbar.pas | 2 +- components/rx/tooledit.pas | 21 +- 36 files changed, 4743 insertions(+), 442 deletions(-) create mode 100644 components/rx/languages/register_rxctrl.po create mode 100644 components/rx/languages/rxconst.po create mode 100644 components/rx/languages/rxdconst.es.po create mode 100644 components/rx/languages/rxdconst.po create mode 100644 components/rx/languages/rxdconst.ru.po create mode 100644 components/rx/languages/rxmemds.po create mode 100644 components/rx/rxdbgrid_columsunit.lrt create mode 100644 components/rx/rxfilterby.lfm create mode 100644 components/rx/rxfilterby.lrs create mode 100644 components/rx/rxfilterby.lrt create mode 100644 components/rx/rxfilterby.pas create mode 100644 components/rx/rxsortby.lfm create mode 100644 components/rx/rxsortby.lrs create mode 100644 components/rx/rxsortby.lrt create mode 100644 components/rx/rxsortby.pas diff --git a/components/rx/docs/WhatsNew.eng.txt b/components/rx/docs/WhatsNew.eng.txt index d53d522d4..84d12494a 100644 --- a/components/rx/docs/WhatsNew.eng.txt +++ b/components/rx/docs/WhatsNew.eng.txt @@ -19,7 +19,14 @@ - fix sort order in TRxMemDataSet - fix draw buttons in ToolPanel with use system themes - fix error in TRxDBComboBox - + New mode - Quick search data in grid (code from with minor fix) + + New mode - Quick search data in grid (code from Aleksey Kozlov with minor fix) + - fix error in sort data for Postgres (grigoreo) + + FBDataSet poNotSetDefaultParams - + - RxDateEdit popup + + ToolBar + + TCustomRxDateEdit.YearDigits + + Big pathc from Rene Herranz Daniel (rhdaniel74.(at).gmail.com) - add new functions for sorting data, + top-left menu, filter for data (with minor fix) 22.05.2008 - version 2.0.0.136 (svn revision 100) + In TRxCustomDBLookupCombo add check for CircularDataLink diff --git a/components/rx/docs/WhatsNew.rus.txt b/components/rx/docs/WhatsNew.rus.txt index c095c0458..bcf0cf10f 100644 --- a/components/rx/docs/WhatsNew.rus.txt +++ b/components/rx/docs/WhatsNew.rus.txt @@ -23,8 +23,15 @@ + Реализована возможность объединения ячеек в заголовке таблицы (смотрите в демке на RxDBGrid) - Исправлена ошибка установки значения для TRxDBComboBox - + Реализовн режим быстрого поиска (код от Алексея Козлова с небольшими доработками) - подробнее смотри пункт 6 в файле readmy.txt - + + Реализовн режим быстрого поиска (код от Алексея Козлова с небольшими доработками) - подробнее смотри пункт 6 в + файле readmy.txt + - Исправлена ошибка при работе сортировки с рускими полями под Postgres (grigoreo) + + В опциях FBDataSet добавлен флаг poNotSetDefaultParams - не устанавливать форматы полей при открытии БД + - Исправлена ошибка переключения стиля RxDateEdit с диалога на popup + + Улучшена отрисовка текста кнопки в ToolBar + + Свойство TCustomRxDateEdit.YearDigits теперь работает + + Большой патч от Rene Herranz Daniel (rhdaniel74.(at).gmail.com) - доработки по сортировке данных, + меню правого верхнего угла, фильтрация данных 22.05.2008 - версия 2.0.0.136 (svn revision 100) + У объекта TRxCustomDBLookupCombo введён контроль на CircularDataLink + У объекта TRxCustomDBLookupCombo ускорена отрисовка данных diff --git a/components/rx/exsortfb.pas b/components/rx/exsortfb.pas index 4b24f9e63..ae063f938 100644 --- a/components/rx/exsortfb.pas +++ b/components/rx/exsortfb.pas @@ -1,3 +1,33 @@ +{ RxDBGrid sort engine module for FBDataSet + + Copyright (C) 2009 Lagunov Aleksey alexs75@hotbox.ru + + This library is free software; you can redistribute it and/or modify it + under the terms of the GNU Library General Public License as published by + the Free Software Foundation; either version 2 of the License, or (at your + option) any later version with the following modification: + + As a special exception, the copyright holders of this library give you + permission to link this library with independent modules to produce an + executable, regardless of the license terms of these independent modules,and + to copy and distribute the resulting executable under terms of your choice, + provided that you also meet, for each linked independent module, the terms + and conditions of the license of that module. An independent module is a + module which is not derived from or based on this library. If you modify + this library, you may extend this exception to your version of the library, + but you are not obligated to do so. If you do not wish to do so, delete this + exception statement from your version. + + This program is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License + for more details. + + You should have received a copy of the GNU Library General Public License + along with this library; if not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +} + unit exsortfb; {$mode objfpc}{$H+} diff --git a/components/rx/exsortzeos.pas b/components/rx/exsortzeos.pas index a4b88895a..5cbec709d 100644 --- a/components/rx/exsortzeos.pas +++ b/components/rx/exsortzeos.pas @@ -5,13 +5,7 @@ unit exsortzeos; interface uses - Classes, SysUtils, DB, - {$IFDEF FPC} - RxDBGrid - {$ELSE} - exDBGrid - {$ENDIF} - ,ZConnection, ZDataset, ZAbstractRODataset; + Classes, SysUtils, DB, RxDBGrid, ZConnection, ZDataset, ZAbstractRODataset; type TFBDataSetSortEngine = class(TExDBGridSortEngine) @@ -20,14 +14,16 @@ type end; implementation -//uses FBCustomDataSet; procedure TFBDataSetSortEngine.Sort(Field:TField; ADataSet:TDataSet; Asc:boolean); begin - if Assigned(ADataSet) then begin - (ADataSet as TZQuery).SortedFields:=Field.FieldName; - if Asc then (ADataSet as TZQuery).SortType:=stAscending - else (ADataSet as TZQuery).SortType:=stDescending; + if Assigned(ADataSet) then + begin + (ADataSet as TZQuery).SortedFields:='"' + Field.FieldName + '"'; + if Asc then + (ADataSet as TZQuery).SortType:=stAscending + else + (ADataSet as TZQuery).SortType:=stDescending; end end; diff --git a/components/rx/languages/register_rxctrl.po b/components/rx/languages/register_rxctrl.po new file mode 100644 index 000000000..1e423145e --- /dev/null +++ b/components/rx/languages/register_rxctrl.po @@ -0,0 +1,11 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: register_rxctrl.sloadicon +msgid "Load icon" +msgstr "" + +#: register_rxctrl.stesttrxlogindialog +msgid "Test TRxLoginDialog" +msgstr "" + diff --git a/components/rx/languages/rxconst.po b/components/rx/languages/rxconst.po new file mode 100644 index 000000000..2ec717eb9 --- /dev/null +++ b/components/rx/languages/rxconst.po @@ -0,0 +1,55 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: rxconst.sbrowse +msgid "Browse" +msgstr "" + +#: rxconst.sdatedlgtitle +msgid "Select a Date" +msgstr "" + +#: rxconst.sdefaultfilter +msgid "All files (*.*)|*.*" +msgstr "" + +#: rxconst.sdetails +msgid "Details" +msgstr "" + +#: rxconst.sfilenotexec +msgid "File specified is not an executable file, dynamic-link library, or icon file" +msgstr "" + +#: rxconst.sloadliberror +msgid "Could not load '%s' library" +msgstr "" + +#: rxconst.snextmonth +msgid "Next Month|" +msgstr "" + +#: rxconst.snextyear +msgid "Next Year|" +msgstr "" + +#: rxconst.snotimplemented +msgid "Function not yet implemented" +msgstr "" + +#: rxconst.sprevmonth +msgid "Previous Month|" +msgstr "" + +#: rxconst.sprevyear +msgid "Previous Year|" +msgstr "" + +#: rxconst.stocurdate +msgid "Set current date" +msgstr "" + +#: rxconst.swindowsicofiles +msgid "Windows Ico files (*.ico)|*.ico|All files (*.*)|*.*" +msgstr "" + diff --git a/components/rx/languages/rxdconst.es.po b/components/rx/languages/rxdconst.es.po new file mode 100644 index 000000000..1f0617497 --- /dev/null +++ b/components/rx/languages/rxdconst.es.po @@ -0,0 +1,395 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: rxdconst.sapptitlelabel +msgid "Application \"%s\"" +msgstr "" + +#: rxdconst.sbrowsedata +msgid "browse" +msgstr "" + +#: rxdconst.scalcfieldsdata +msgid "calc" +msgstr "" + +#: rxdconst.scapturefilter +msgid "Элементы уп#209авления захвачены фильт#209ом" +msgstr "" + +#: rxdconst.schangepassword +msgid "Change password" +msgstr "" + +#: rxdconst.scirculardatalink +msgid "SCircularDataLink" +msgstr "" + +#: rxdconst.sconfirmpasswordlabel +msgid "&Confirm:" +msgstr "" + +#: rxdconst.sconfirmsave +msgid "Data changed. Save?" +msgstr "" + +#: rxdconst.sdatabasename +msgid "Database loocked: %s" +msgstr "" + +#: rxdconst.sdatasourcefixed +msgid "SDataSourceFixed" +msgstr "" + +#: rxdconst.sdbexceptcaption +msgid "Error in DB engine" +msgstr "" + +#: rxdconst.sdeletemultiplerecords +msgid "Delete all selected records?" +msgstr "" + +#: rxdconst.sdeleterecordquestion +msgid "Delete record?" +msgstr "" + +#: rxdconst.seditdata +msgid "editing" +msgstr "" + +#: rxdconst.serrormsglabel +msgid "Error message" +msgstr "" + +#: rxdconst.sexprbadcompare +msgid "Опе#209ации с#209авнения т#209ебуют наличия поля и константы" +msgstr "" + +#: rxdconst.sexprbadfield +msgid "Field '%s' not used in filter expression" +msgstr "" + +#: rxdconst.sexprbadnulltest +msgid "NULL-values enabled in '=' и '<>'" +msgstr "" + +#: rxdconst.sexprexpected +msgid "Ожидалось вы#209ажение, а вст#209ечено %s" +msgstr "" + +#: rxdconst.sexprincorrect +msgid "Error in filter expression" +msgstr "" + +#: rxdconst.sexprinvalidchar +msgid "Error symbol in expression: '%s'" +msgstr "" + +#: rxdconst.sexprnameerror +msgid "Error in filed name" +msgstr "" + +#: rxdconst.sexprnorparen +msgid "Ожидалось ')', а вст#209ечено: %s" +msgstr "" + +#: rxdconst.sexprnotboolean +msgid "Field '%s' is not boolean" +msgstr "" + +#: rxdconst.sexprstringerror +msgid "Error in string const" +msgstr "" + +#: rxdconst.sexprtermination +msgid "Error in filter end" +msgstr "" + +#: rxdconst.sfieldreadonly +msgid "SFieldReadOnly %s" +msgstr "" + +#: rxdconst.sfieldrequired +msgid "Field '%s' must have a value" +msgstr "" + +#: rxdconst.sfieldtypemismatch +msgid "Type mismatch for field '%s', expecting: %s actual: %s" +msgstr "" + +#: rxdconst.shintlabel +msgid "Enter you user name and password" +msgstr "" + +#: rxdconst.sinactivedata +msgid "inactive" +msgstr "" + +#: rxdconst.sinsertdata +msgid "append" +msgstr "" + +#: rxdconst.sinvaliddate +msgid "Invalid Date" +msgstr "" + +#: rxdconst.sinvalidfields +msgid "No fields defined" +msgstr "" + +#: rxdconst.sinvalidusername +msgid "User name or password not valid" +msgstr "" + +#: rxdconst.slocaldatabase +msgid "Невозможно п#209оизвести эту опе#209ацию с локальной базой данных" +msgstr "" + +#: rxdconst.smemnorecords +msgid "No data found" +msgstr "" + +#: rxdconst.smore1 +msgid "&More >>" +msgstr "" + +#: rxdconst.smore2 +msgid "&Less <<" +msgstr "" + +#: rxdconst.snewpasswordlabel +msgid "&New password:" +msgstr "" + +#: rxdconst.snextbutton +msgid "&Next" +msgstr "" + +#: rxdconst.snotcapturefilter +msgid "Элементы уп#209авления должны быть захвачены фильт#209ом" +msgstr "" + +#: rxdconst.snotediting +msgid "Dataset not in edit or insert mode" +msgstr "" + +#: rxdconst.soldpasswordlabel +msgid "&Old password:" +msgstr "" + +#: rxdconst.spasswordchanged +msgid "Password changed" +msgstr "" + +#: rxdconst.spasswordlabel +msgid "&Password:" +msgstr "" + +#: rxdconst.spasswordnotchanged +msgid "Password not changed" +msgstr "" + +#: rxdconst.spasswordsmismatch +msgid "New password and confirmation not equal" +msgstr "" + +#: rxdconst.sprevbutton +msgid "&Prior" +msgstr "" + +#: rxdconst.spropdefbylookup +msgid "PropDefByLookup" +msgstr "" + +#: rxdconst.sregistration +msgid "Register" +msgstr "" + +#: rxdconst.sretrylogin +msgid "Вы хотите повто#209ить попытку соединения с базой данных?" +msgstr "" + +#: rxdconst.srxascendign +msgid "Ascendente" +msgstr "" + +#: rxdconst.srxdbgridemptifilter +msgid "(Empty)" +msgstr "(Todos)" + +#: rxdconst.srxdbgridfilter +msgid "Filter data" +msgstr "Filtrar" + +#: rxdconst.srxdbgridfilterclear +msgctxt "rxdconst.srxdbgridfilterclear" +msgid "Clear filter" +msgstr "Quitar Filtro" + +#: rxdconst.srxdbgridfiltersimple +msgid "Filter in table" +msgstr "Filtrar en Encabezado" + +#: rxdconst.srxdbgridfind +msgctxt "rxdconst.srxdbgridfind" +msgid "Find data" +msgstr "Buscar" + +#: rxdconst.srxdbgridfindcaption +msgctxt "rxdconst.srxdbgridfindcaption" +msgid "Find data" +msgstr "Buscar" + +#: rxdconst.srxdbgridfindcasesens +msgid "Case sensetive" +msgstr "" + +#: rxdconst.srxdbgridfinddirecion +msgid "Direction" +msgstr "" + +#: rxdconst.srxdbgridfindonfield +msgid "Find on field" +msgstr "" + +#: rxdconst.srxdbgridfindpartial +msgid "Partial key" +msgstr "" + +#: rxdconst.srxdbgridfindrangeall +msgid "All" +msgstr "" + +#: rxdconst.srxdbgridfindrangeback +msgid "Backward" +msgstr "" + +#: rxdconst.srxdbgridfindrangeforw +msgid "Forward" +msgstr "" + +#: rxdconst.srxdbgridfindtext +msgid "Text to find" +msgstr "" + +#: rxdconst.srxdbgridselcolcaption +msgid "Grid columns" +msgstr "" + +#: rxdconst.srxdbgridselcolhint1 +msgid "Move selected column up" +msgstr "" + +#: rxdconst.srxdbgridselcolhint2 +msgid "Move selected column down" +msgstr "" + +#: rxdconst.srxdbgridselectcolumns +msgid "Select visible collumns" +msgstr "Seleccionar Columnas" + +#: rxdconst.srxdbgridsortbycolumns +msgid "Sort data for collumns" +msgstr "Ordenar por Columna" + +#: rxdconst.srxdescending +msgid "Descendente" +msgstr "" + +#: rxdconst.srxfilterformapply +msgid "Apply" +msgstr "Aceptar" + +#: rxdconst.srxfilterformcancel +msgid "Cancel" +msgstr "Cancelar" + +#: rxdconst.srxfilterformcaption +msgid "Filter conditions" +msgstr "Condiciones de Filtro" + +#: rxdconst.srxfilterformclear +msgctxt "rxdconst.srxfilterformclear" +msgid "Clear filter" +msgstr "Limpiar Todo" + +#: rxdconst.srxfilterformcondition +msgid "Condition :" +msgstr "Condición:" + +#: rxdconst.srxfilterformend +msgid "end." +msgstr "FIN." + +#: rxdconst.srxfilterformonfield +msgid "On field :" +msgstr "Campo :" + +#: rxdconst.srxfilterformoperaion +msgid "Operation :" +msgstr "Operación :" + +#: rxdconst.srxfilterformoperand +msgid "Operand :" +msgstr "Operando :" + +#: rxdconst.srxfilterformselectexp +msgid "Enter filter expression for data in table:" +msgstr "Seleccionar todos los registros que cumplan las siguientes condiciónes :" + +#: rxdconst.srxsortbyformaddfield +msgid "&Add field" +msgstr "&Adicionar" + +#: rxdconst.srxsortbyformallfields +msgid "&Fields in dataset:" +msgstr "&Orden de Ordenamiento :" + +#: rxdconst.srxsortbyformcaption +msgid "Sort on field" +msgstr "" + +#: rxdconst.srxsortbyformmovednfield +msgid "&Down" +msgstr "A&bajo" + +#: rxdconst.srxsortbyformmoveupfield +msgid "&Up" +msgstr "A&rriba" + +#: rxdconst.srxsortbyformremovefield +msgid "&Remove" +msgstr "&Eliminar" + +#: rxdconst.srxsortbyformsortfields +msgid "&Selected fields:" +msgstr "&Campos Disponibles :" + +#: rxdconst.srxsortbyformsortorder +msgid "Select field for sort data:" +msgstr "Seleccionar Dirección de Ordenamiento :" + +#: rxdconst.sservererrorlabel +msgid "Server error" +msgstr "" + +#: rxdconst.ssetkeydata +msgid "find" +msgstr "" + +#: rxdconst.sunknownfieldtype +msgid "SUnknownFieldType %s" +msgstr "" + +#: rxdconst.sunlockcaption +msgid "Unloock" +msgstr "" + +#: rxdconst.sunlockhint +msgid "Enter you password" +msgstr "" + +#: rxdconst.susernamelabel +msgid "&User name:" +msgstr "" + diff --git a/components/rx/languages/rxdconst.po b/components/rx/languages/rxdconst.po new file mode 100644 index 000000000..85eb41891 --- /dev/null +++ b/components/rx/languages/rxdconst.po @@ -0,0 +1,395 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: rxdconst.sapptitlelabel +msgid "Application \"%s\"" +msgstr "" + +#: rxdconst.sbrowsedata +msgid "browse" +msgstr "" + +#: rxdconst.scalcfieldsdata +msgid "calc" +msgstr "" + +#: rxdconst.scapturefilter +msgid "Элементы уп#209авления захвачены фильт#209ом" +msgstr "" + +#: rxdconst.schangepassword +msgid "Change password" +msgstr "" + +#: rxdconst.scirculardatalink +msgid "SCircularDataLink" +msgstr "" + +#: rxdconst.sconfirmpasswordlabel +msgid "&Confirm:" +msgstr "" + +#: rxdconst.sconfirmsave +msgid "Data changed. Save?" +msgstr "" + +#: rxdconst.sdatabasename +msgid "Database loocked: %s" +msgstr "" + +#: rxdconst.sdatasourcefixed +msgid "SDataSourceFixed" +msgstr "" + +#: rxdconst.sdbexceptcaption +msgid "Error in DB engine" +msgstr "" + +#: rxdconst.sdeletemultiplerecords +msgid "Delete all selected records?" +msgstr "" + +#: rxdconst.sdeleterecordquestion +msgid "Delete record?" +msgstr "" + +#: rxdconst.seditdata +msgid "editing" +msgstr "" + +#: rxdconst.serrormsglabel +msgid "Error message" +msgstr "" + +#: rxdconst.sexprbadcompare +msgid "Опе#209ации с#209авнения т#209ебуют наличия поля и константы" +msgstr "" + +#: rxdconst.sexprbadfield +msgid "Field '%s' not used in filter expression" +msgstr "" + +#: rxdconst.sexprbadnulltest +msgid "NULL-values enabled in '=' и '<>'" +msgstr "" + +#: rxdconst.sexprexpected +msgid "Ожидалось вы#209ажение, а вст#209ечено %s" +msgstr "" + +#: rxdconst.sexprincorrect +msgid "Error in filter expression" +msgstr "" + +#: rxdconst.sexprinvalidchar +msgid "Error symbol in expression: '%s'" +msgstr "" + +#: rxdconst.sexprnameerror +msgid "Error in filed name" +msgstr "" + +#: rxdconst.sexprnorparen +msgid "Ожидалось ')', а вст#209ечено: %s" +msgstr "" + +#: rxdconst.sexprnotboolean +msgid "Field '%s' is not boolean" +msgstr "" + +#: rxdconst.sexprstringerror +msgid "Error in string const" +msgstr "" + +#: rxdconst.sexprtermination +msgid "Error in filter end" +msgstr "" + +#: rxdconst.sfieldreadonly +msgid "SFieldReadOnly %s" +msgstr "" + +#: rxdconst.sfieldrequired +msgid "Field '%s' must have a value" +msgstr "" + +#: rxdconst.sfieldtypemismatch +msgid "Type mismatch for field '%s', expecting: %s actual: %s" +msgstr "" + +#: rxdconst.shintlabel +msgid "Enter you user name and password" +msgstr "" + +#: rxdconst.sinactivedata +msgid "inactive" +msgstr "" + +#: rxdconst.sinsertdata +msgid "append" +msgstr "" + +#: rxdconst.sinvaliddate +msgid "Invalid Date" +msgstr "" + +#: rxdconst.sinvalidfields +msgid "No fields defined" +msgstr "" + +#: rxdconst.sinvalidusername +msgid "User name or password not valid" +msgstr "" + +#: rxdconst.slocaldatabase +msgid "Невозможно п#209оизвести эту опе#209ацию с локальной базой данных" +msgstr "" + +#: rxdconst.smemnorecords +msgid "No data found" +msgstr "" + +#: rxdconst.smore1 +msgid "&More >>" +msgstr "" + +#: rxdconst.smore2 +msgid "&Less <<" +msgstr "" + +#: rxdconst.snewpasswordlabel +msgid "&New password:" +msgstr "" + +#: rxdconst.snextbutton +msgid "&Next" +msgstr "" + +#: rxdconst.snotcapturefilter +msgid "Элементы уп#209авления должны быть захвачены фильт#209ом" +msgstr "" + +#: rxdconst.snotediting +msgid "Dataset not in edit or insert mode" +msgstr "" + +#: rxdconst.soldpasswordlabel +msgid "&Old password:" +msgstr "" + +#: rxdconst.spasswordchanged +msgid "Password changed" +msgstr "" + +#: rxdconst.spasswordlabel +msgid "&Password:" +msgstr "" + +#: rxdconst.spasswordnotchanged +msgid "Password not changed" +msgstr "" + +#: rxdconst.spasswordsmismatch +msgid "New password and confirmation not equal" +msgstr "" + +#: rxdconst.sprevbutton +msgid "&Prior" +msgstr "" + +#: rxdconst.spropdefbylookup +msgid "PropDefByLookup" +msgstr "" + +#: rxdconst.sregistration +msgid "Register" +msgstr "" + +#: rxdconst.sretrylogin +msgid "Вы хотите повто#209ить попытку соединения с базой данных?" +msgstr "" + +#: rxdconst.srxascendign +msgid "Ascendente" +msgstr "" + +#: rxdconst.srxdbgridemptifilter +msgid "(Empty)" +msgstr "" + +#: rxdconst.srxdbgridfilter +msgid "Filter data" +msgstr "" + +#: rxdconst.srxdbgridfilterclear +msgctxt "rxdconst.srxdbgridfilterclear" +msgid "Clear filter" +msgstr "" + +#: rxdconst.srxdbgridfiltersimple +msgid "Filter in table" +msgstr "" + +#: rxdconst.srxdbgridfind +msgctxt "rxdconst.srxdbgridfind" +msgid "Find data" +msgstr "" + +#: rxdconst.srxdbgridfindcaption +msgctxt "rxdconst.srxdbgridfindcaption" +msgid "Find data" +msgstr "" + +#: rxdconst.srxdbgridfindcasesens +msgid "Case sensetive" +msgstr "" + +#: rxdconst.srxdbgridfinddirecion +msgid "Direction" +msgstr "" + +#: rxdconst.srxdbgridfindonfield +msgid "Find on field" +msgstr "" + +#: rxdconst.srxdbgridfindpartial +msgid "Partial key" +msgstr "" + +#: rxdconst.srxdbgridfindrangeall +msgid "All" +msgstr "" + +#: rxdconst.srxdbgridfindrangeback +msgid "Backward" +msgstr "" + +#: rxdconst.srxdbgridfindrangeforw +msgid "Forward" +msgstr "" + +#: rxdconst.srxdbgridfindtext +msgid "Text to find" +msgstr "" + +#: rxdconst.srxdbgridselcolcaption +msgid "Grid columns" +msgstr "" + +#: rxdconst.srxdbgridselcolhint1 +msgid "Move selected column up" +msgstr "" + +#: rxdconst.srxdbgridselcolhint2 +msgid "Move selected column down" +msgstr "" + +#: rxdconst.srxdbgridselectcolumns +msgid "Select visible collumns" +msgstr "" + +#: rxdconst.srxdbgridsortbycolumns +msgid "Sort data for collumns" +msgstr "" + +#: rxdconst.srxdescending +msgid "Descendente" +msgstr "" + +#: rxdconst.srxfilterformapply +msgid "Apply" +msgstr "" + +#: rxdconst.srxfilterformcancel +msgid "Cancel" +msgstr "" + +#: rxdconst.srxfilterformcaption +msgid "Filter conditions" +msgstr "" + +#: rxdconst.srxfilterformclear +msgctxt "rxdconst.srxfilterformclear" +msgid "Clear filter" +msgstr "" + +#: rxdconst.srxfilterformcondition +msgid "Condition :" +msgstr "" + +#: rxdconst.srxfilterformend +msgid "end." +msgstr "" + +#: rxdconst.srxfilterformonfield +msgid "On field :" +msgstr "" + +#: rxdconst.srxfilterformoperaion +msgid "Operation :" +msgstr "" + +#: rxdconst.srxfilterformoperand +msgid "Operand :" +msgstr "" + +#: rxdconst.srxfilterformselectexp +msgid "Enter filter expression for data in table:" +msgstr "" + +#: rxdconst.srxsortbyformaddfield +msgid "&Add field" +msgstr "" + +#: rxdconst.srxsortbyformallfields +msgid "&Fields in dataset:" +msgstr "" + +#: rxdconst.srxsortbyformcaption +msgid "Sort on field" +msgstr "" + +#: rxdconst.srxsortbyformmovednfield +msgid "&Down" +msgstr "" + +#: rxdconst.srxsortbyformmoveupfield +msgid "&Up" +msgstr "" + +#: rxdconst.srxsortbyformremovefield +msgid "&Remove" +msgstr "" + +#: rxdconst.srxsortbyformsortfields +msgid "&Selected fields:" +msgstr "" + +#: rxdconst.srxsortbyformsortorder +msgid "Select field for sort data:" +msgstr "" + +#: rxdconst.sservererrorlabel +msgid "Server error" +msgstr "" + +#: rxdconst.ssetkeydata +msgid "find" +msgstr "" + +#: rxdconst.sunknownfieldtype +msgid "SUnknownFieldType %s" +msgstr "" + +#: rxdconst.sunlockcaption +msgid "Unloock" +msgstr "" + +#: rxdconst.sunlockhint +msgid "Enter you password" +msgstr "" + +#: rxdconst.susernamelabel +msgid "&User name:" +msgstr "" + diff --git a/components/rx/languages/rxdconst.ru.po b/components/rx/languages/rxdconst.ru.po new file mode 100644 index 000000000..a67dea921 --- /dev/null +++ b/components/rx/languages/rxdconst.ru.po @@ -0,0 +1,395 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: rxdconst.sapptitlelabel +msgid "Application \"%s\"" +msgstr "Программа \"%s\"" + +#: rxdconst.sbrowsedata +msgid "browse" +msgstr "просмотр" + +#: rxdconst.scalcfieldsdata +msgid "calc" +msgstr "вычисление" + +#: rxdconst.scapturefilter +msgid "Элементы уп#209авления захвачены фильт#209ом" +msgstr "Элементы управления захвачены фильтром" + +#: rxdconst.schangepassword +msgid "Change password" +msgstr "Изменить пароль" + +#: rxdconst.scirculardatalink +msgid "SCircularDataLink" +msgstr "" + +#: rxdconst.sconfirmpasswordlabel +msgid "&Confirm:" +msgstr "&Подтверждение:" + +#: rxdconst.sconfirmsave +msgid "Data changed. Save?" +msgstr "Данные были изменены. Сохранить?" + +#: rxdconst.sdatabasename +msgid "Database loocked: %s" +msgstr "База данных блокирована: %s" + +#: rxdconst.sdatasourcefixed +msgid "SDataSourceFixed" +msgstr "" + +#: rxdconst.sdbexceptcaption +msgid "Error in DB engine" +msgstr "Ошибка ядры БД" + +#: rxdconst.sdeletemultiplerecords +msgid "Delete all selected records?" +msgstr "Удалить все выделенные записи" + +#: rxdconst.sdeleterecordquestion +msgid "Delete record?" +msgstr "Удалить запись" + +#: rxdconst.seditdata +msgid "editing" +msgstr "редактирование" + +#: rxdconst.serrormsglabel +msgid "Error message" +msgstr "Сообщение об ошибке" + +#: rxdconst.sexprbadcompare +msgid "Опе#209ации с#209авнения т#209ебуют наличия поля и константы" +msgstr "Операции сравнения требуют наличия поля и константы" + +#: rxdconst.sexprbadfield +msgid "Field '%s' not used in filter expression" +msgstr "Поле '%s' не может быть использовано в выражении фильтрации" + +#: rxdconst.sexprbadnulltest +msgid "NULL-values enabled in '=' и '<>'" +msgstr "NULL-значения разрешены только в выражениях '=' и '<>'" + +#: rxdconst.sexprexpected +msgid "Ожидалось вы#209ажение, а вст#209ечено %s" +msgstr "Ожидалось выражение, а встречено %s" + +#: rxdconst.sexprincorrect +msgid "Error in filter expression" +msgstr "Ошибка в выражении фильтра" + +#: rxdconst.sexprinvalidchar +msgid "Error symbol in expression: '%s'" +msgstr "Ошибочный символ в выражении: '%s'" + +#: rxdconst.sexprnameerror +msgid "Error in filed name" +msgstr "" + +#: rxdconst.sexprnorparen +msgid "Ожидалось ')', а вст#209ечено: %s" +msgstr "Ожидалось ')', а встречено: %s" + +#: rxdconst.sexprnotboolean +msgid "Field '%s' is not boolean" +msgstr "Поле '%s' не логического типа" + +#: rxdconst.sexprstringerror +msgid "Error in string const" +msgstr "Ошибка в строковой константе" + +#: rxdconst.sexprtermination +msgid "Error in filter end" +msgstr "Ошибка в окончании выражения фильтра" + +#: rxdconst.sfieldreadonly +msgid "SFieldReadOnly %s" +msgstr "" + +#: rxdconst.sfieldrequired +msgid "Field '%s' must have a value" +msgstr "Поле '%s' ожидает значение" + +#: rxdconst.sfieldtypemismatch +msgid "Type mismatch for field '%s', expecting: %s actual: %s" +msgstr "Несоответсвие типов для поля '%s', необходимо: %s введено: %s" + +#: rxdconst.shintlabel +msgid "Enter you user name and password" +msgstr "Введите ваше имя и пароль" + +#: rxdconst.sinactivedata +msgid "inactive" +msgstr "не активный" + +#: rxdconst.sinsertdata +msgid "append" +msgstr "вставка" + +#: rxdconst.sinvaliddate +msgid "Invalid Date" +msgstr "Неверная дата" + +#: rxdconst.sinvalidfields +msgid "No fields defined" +msgstr "Нет объявления полей" + +#: rxdconst.sinvalidusername +msgid "User name or password not valid" +msgstr "Ошибка в имени пользователя или пароле" + +#: rxdconst.slocaldatabase +msgid "Невозможно п#209оизвести эту опе#209ацию с локальной базой данных" +msgstr "Невозможно произвести эту операцию с локальной базой данных" + +#: rxdconst.smemnorecords +msgid "No data found" +msgstr "Данных не найдено" + +#: rxdconst.smore1 +msgid "&More >>" +msgstr "&Больше >>" + +#: rxdconst.smore2 +msgid "&Less <<" +msgstr "&Меньше <<" + +#: rxdconst.snewpasswordlabel +msgid "&New password:" +msgstr "&Новый пароль:" + +#: rxdconst.snextbutton +msgid "&Next" +msgstr "&Дальше" + +#: rxdconst.snotcapturefilter +msgid "Элементы уп#209авления должны быть захвачены фильт#209ом" +msgstr "Элементы управления должны быть захвачены фильтром" + +#: rxdconst.snotediting +msgid "Dataset not in edit or insert mode" +msgstr "Набор данных не в режиме редактирования или вставки" + +#: rxdconst.soldpasswordlabel +msgid "&Old password:" +msgstr "&Старый пароль" + +#: rxdconst.spasswordchanged +msgid "Password changed" +msgstr "Пароль изменён" + +#: rxdconst.spasswordlabel +msgid "&Password:" +msgstr "&Пароль:" + +#: rxdconst.spasswordnotchanged +msgid "Password not changed" +msgstr "Пароль не изменён" + +#: rxdconst.spasswordsmismatch +msgid "New password and confirmation not equal" +msgstr "Новый пароль и подтверждение не совпадают" + +#: rxdconst.sprevbutton +msgid "&Prior" +msgstr "&Превыдущие" + +#: rxdconst.spropdefbylookup +msgid "PropDefByLookup" +msgstr "" + +#: rxdconst.sregistration +msgid "Register" +msgstr "Регистрация" + +#: rxdconst.sretrylogin +msgid "Вы хотите повто#209ить попытку соединения с базой данных?" +msgstr "Вы хотите повторить попытку соединения с базой данных?" + +#: rxdconst.srxascendign +msgid "Ascendente" +msgstr "" + +#: rxdconst.srxdbgridemptifilter +msgid "(Empty)" +msgstr "(Нет)" + +#: rxdconst.srxdbgridfilter +msgid "Filter data" +msgstr "Фильтр данных" + +#: rxdconst.srxdbgridfilterclear +msgctxt "rxdconst.srxdbgridfilterclear" +msgid "Clear filter" +msgstr "Очистить фильтр" + +#: rxdconst.srxdbgridfiltersimple +msgid "Filter in table" +msgstr "Фильтр в таблице" + +#: rxdconst.srxdbgridfind +msgctxt "rxdconst.srxdbgridfind" +msgid "Find data" +msgstr "Поиск данных" + +#: rxdconst.srxdbgridfindcaption +msgctxt "rxdconst.srxdbgridfindcaption" +msgid "Find data" +msgstr "Поиск данных" + +#: rxdconst.srxdbgridfindcasesens +msgid "Case sensetive" +msgstr "" + +#: rxdconst.srxdbgridfinddirecion +msgid "Direction" +msgstr "Направление" + +#: rxdconst.srxdbgridfindonfield +msgid "Find on field" +msgstr "Искать по полю" + +#: rxdconst.srxdbgridfindpartial +msgid "Partial key" +msgstr "Частиный поиск" + +#: rxdconst.srxdbgridfindrangeall +msgid "All" +msgstr "Всё" + +#: rxdconst.srxdbgridfindrangeback +msgid "Backward" +msgstr "Назад" + +#: rxdconst.srxdbgridfindrangeforw +msgid "Forward" +msgstr "Вперёд" + +#: rxdconst.srxdbgridfindtext +msgid "Text to find" +msgstr "Текст для поиска" + +#: rxdconst.srxdbgridselcolcaption +msgid "Grid columns" +msgstr "Поля таблицы" + +#: rxdconst.srxdbgridselcolhint1 +msgid "Move selected column up" +msgstr "Переместить выбранное поле выше" + +#: rxdconst.srxdbgridselcolhint2 +msgid "Move selected column down" +msgstr "Переместить выбранное поле ниже" + +#: rxdconst.srxdbgridselectcolumns +msgid "Select visible collumns" +msgstr "Выбор столбцов для отображения" + +#: rxdconst.srxdbgridsortbycolumns +msgid "Sort data for collumns" +msgstr "Сортировать данные по колонкам" + +#: rxdconst.srxdescending +msgid "Descendente" +msgstr "" + +#: rxdconst.srxfilterformapply +msgid "Apply" +msgstr "Применить" + +#: rxdconst.srxfilterformcancel +msgid "Cancel" +msgstr "Отмена" + +#: rxdconst.srxfilterformcaption +msgid "Filter conditions" +msgstr "Выражение фильтра" + +#: rxdconst.srxfilterformclear +msgctxt "rxdconst.srxfilterformclear" +msgid "Clear filter" +msgstr "Очистить фильтр" + +#: rxdconst.srxfilterformcondition +msgid "Condition :" +msgstr "Выражение :" + +#: rxdconst.srxfilterformend +msgid "end." +msgstr "конец." + +#: rxdconst.srxfilterformonfield +msgid "On field :" +msgstr "На поле :" + +#: rxdconst.srxfilterformoperaion +msgid "Operation :" +msgstr "Операция :" + +#: rxdconst.srxfilterformoperand +msgid "Operand :" +msgstr "Операнд :" + +#: rxdconst.srxfilterformselectexp +msgid "Enter filter expression for data in table:" +msgstr "Введите выражение фильтрации данных в таблице:" + +#: rxdconst.srxsortbyformaddfield +msgid "&Add field" +msgstr "&Добавить поле" + +#: rxdconst.srxsortbyformallfields +msgid "&Fields in dataset:" +msgstr "&Поля в таблице" + +#: rxdconst.srxsortbyformcaption +msgid "Sort on field" +msgstr "Сортировать по полям" + +#: rxdconst.srxsortbyformmovednfield +msgid "&Down" +msgstr "&Вниз" + +#: rxdconst.srxsortbyformmoveupfield +msgid "&Up" +msgstr "&Вверх" + +#: rxdconst.srxsortbyformremovefield +msgid "&Remove" +msgstr "&Убрать" + +#: rxdconst.srxsortbyformsortfields +msgid "&Selected fields:" +msgstr "&Выбранные поля" + +#: rxdconst.srxsortbyformsortorder +msgid "Select field for sort data:" +msgstr "Укажите поля для сортировки данных :" + +#: rxdconst.sservererrorlabel +msgid "Server error" +msgstr "Ошибка сервера" + +#: rxdconst.ssetkeydata +msgid "find" +msgstr "поиск" + +#: rxdconst.sunknownfieldtype +msgid "SUnknownFieldType %s" +msgstr "" + +#: rxdconst.sunlockcaption +msgid "Unloock" +msgstr "Разблокировать" + +#: rxdconst.sunlockhint +msgid "Enter you password" +msgstr "Введите ваш пароль" + +#: rxdconst.susernamelabel +msgid "&User name:" +msgstr "&Имя пользователя" + diff --git a/components/rx/languages/rxmemds.po b/components/rx/languages/rxmemds.po new file mode 100644 index 000000000..16582d7f9 --- /dev/null +++ b/components/rx/languages/rxmemds.po @@ -0,0 +1,11 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: rxmemds.sinvalidfields +msgid "No fields defined" +msgstr "" + +#: rxmemds.smemnorecords +msgid "No data found" +msgstr "" + diff --git a/components/rx/pickdate.pas b/components/rx/pickdate.pas index 104f86b17..c9a04ae64 100644 --- a/components/rx/pickdate.pas +++ b/components/rx/pickdate.pas @@ -419,8 +419,10 @@ begin if ARow>0 then begin - if not ((gdSelected in aState) and (gdFocused in aState)) then begin - if (FDaysArray[ACol, ARow].DayDate = Date) and (FDaysArray[ACol, ARow].DayColor <> FNotInThisMonthColor) then begin + if not ((gdSelected in aState) and (gdFocused in aState)) then + begin + if (FDaysArray[ACol, ARow].DayDate = Date) and (FDaysArray[ACol, ARow].DayColor <> FNotInThisMonthColor) then + begin R := ARect; // Variant 1 //Dec(R.Bottom, 1); @@ -441,7 +443,7 @@ begin end else begin - Canvas.Font.Color:=clText; + Canvas.Font.Color:=clWindowText; //DrawCellText(ACol, ARow, ARect, AState, ShortDayNames[(Ord(StartOfWeek) + ACol) mod 7 + 1]); if FShortDaysOfWeek <> nil then begin if ACol <= FShortDaysOfWeek.Count - 1 then @@ -622,7 +624,7 @@ begin if IsWeekend(x, y) then FDaysArray[x,y].DayColor:=WeekendColor else - FDaysArray[x,y].DayColor:=clText; + FDaysArray[x,y].DayColor:=clWindowText; FDaysArray[x,y].DayNum:=DayNum; end; FirstDate:=FirstDate+1; @@ -890,6 +892,7 @@ function CreatePopupCalendar(AOwner: TComponent {$IFDEF USED_BiDi}; ABiDiMode: TBiDiMode = bdLeftToRight {$ENDIF}): TPopupCalendar; begin Result := TPopupCalendar.Create(AOwner); + if (AOwner <> nil) and not (csDesigning in AOwner.ComponentState) and (Screen.PixelsPerInch <> 96) then begin { scale to screen res } @@ -952,7 +955,7 @@ begin if AOwner is TControl then ShowHint := TControl(AOwner).ShowHint else ShowHint := True; - if (csDesigning in ComponentState) then Exit; +// if (csDesigning in ComponentState) then Exit; FMonthNames := TStringList.Create; if FMonthNames.Count = 0 then begin diff --git a/components/rx/rxdbgrid.lrs b/components/rx/rxdbgrid.lrs index acdd95b9a..bcb0762b4 100644 --- a/components/rx/rxdbgrid.lrs +++ b/components/rx/rxdbgrid.lrs @@ -11,3 +11,15 @@ LazarusResources.Add('rx_markerup','XPM',[ +'#....a..",'#10'".#......a.",'#10'".aaaaaaaa.",'#10'".bbbbbbbb.",'#10'".....' +'....."};'#10 ]); + +LazarusResources.Add('menu_grid','XPM',[ + '/* XPM */'#10'static const unsigned char * menu_grid_xpm[] = {'#10'"16 16 4 1",' + +#10'" c None",'#10'"! c black",'#10'"# c #800000",'#10'"$ c #FFFF00",' + +#10'" ",'#10'" ! ",'#10'" !#! ",' + +#10'" !###! ",'#10'" !##$##! ",'#10'" !!!#$#!!! ",' + +#10'" !#$#! ",'#10'" !#$#! ",'#10'" !#$#! ",' + +#10'" !#$#! ",'#10'" !#$#! ",'#10'" !!!#$#!!! ",' + +#10'" !##$##! ",'#10'" !###! ",'#10'" !#! ",' + +#10'" ! "};'#10 +]); + diff --git a/components/rx/rxdbgrid.pas b/components/rx/rxdbgrid.pas index a6a0df478..11ef8599e 100644 --- a/components/rx/rxdbgrid.pas +++ b/components/rx/rxdbgrid.pas @@ -7,7 +7,7 @@ interface uses Classes, SysUtils, LResources, LCLType, LCLIntf, Forms, Controls, Graphics, Dialogs, Grids, dbutils, DBGrids, DB, PropertyStorage, vclutils, - LMessages, types, StdCtrls; + LMessages, types, StdCtrls, Menus; const CBadQuickSearchSymbols = [VK_UNKNOWN..VK_HELP]+[VK_LWIN..VK_SLEEP]+[VK_NUMLOCK..VK_SCROLL]+[VK_LSHIFT..VK_OEM_102]+[VK_PROCESSKEY]+[VK_ATTN..VK_UNDEFINED]; @@ -41,21 +41,29 @@ type rdgFilter, rdgMultiTitleLines, rdgMrOkOnDblClik, - rdgAllowQuickSearch + rdgAllowQuickSearch, + rdgAllowFilterForm, + rdgAllowSortForm ); TOptionsRx = set of TOptionRx; + TCreateLookup = TNotifyEvent; + TDisplayLookup = TNotifyEvent; // TDataSetClass = class of TDataSet; TRxColumn = class; + { TExDBGridSortEngine } + TExDBGridSortEngine = class private FDataSetClass:TDataSetClass; public procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean);virtual;abstract; + procedure SortList(ListField:string; ADataSet:TDataSet; Asc:boolean);virtual; end; + TExDBGridSortEngineClass = class of TExDBGridSortEngine; TMLCaptionItem = class @@ -114,6 +122,10 @@ type function GetStatTotal:string; procedure ResetTestValue; procedure UpdateTestValue; + + function DeleteTestValue: boolean; + function PostTestValue: boolean; + function ErrorTestValue: boolean; public constructor Create(Owner:TRxColumn); property Owner:TRxColumn read FOwner; @@ -236,6 +248,21 @@ type FPressed: Boolean; FSwapButtons: Boolean; FTracking: Boolean; + + F_TopRect : TRect; + F_Clicked : Boolean; + F_PopupMenu : TPopupMenu; + F_MenuBMP : TBitmap; + F_EventOnFilterRec : TFilterRecordEvent; + F_EventOnBeforeDelete: TDataSetNotifyEvent; + F_EventOnBeforePost : TDataSetNotifyEvent; + F_EventOnDeleteError : TDataSetErrorEvent; + F_EventOnPostError : TDataSetErrorEvent; + F_LastFilter : TStringList; + F_SortListField : TStringList; + F_CreateLookup : TCreateLookup; + F_DisplayLookup : TDisplayLookup; + //storage //Column resize FColumnResizing : Boolean; @@ -273,6 +300,7 @@ type procedure OutCaptionCellText90(aCol,aRow: Integer;const aRect: TRect; aState: TGridDrawState;const ACaption:string;const TextOrient:TTextOrientation); procedure OutCaptionSortMarker(const aRect: TRect; ASortMarker: TSortMarker); procedure OutCaptionMLCellText(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState; MLI:TMLCaptionItem); + procedure UpdateJMenuStates; //storage procedure OnIniSave(Sender: TObject); @@ -310,7 +338,20 @@ type function IsDefaultRowHeightStored:boolean; procedure VisualChange; override; procedure SetQuickUTF8Search(AValue : String); + + procedure BeforeDel(DataSet: TDataSet); + procedure BeforePo(DataSet: TDataSet); + procedure ErrorDel(DataSet: TDataSet; E: EDatabaseError;var DataAction: TDataAction); + procedure ErrorPo(DataSet: TDataSet; E: EDatabaseError;var DataAction: TDataAction); + Procedure OnFind(Sender: TObject); + Procedure OnFilterBy(Sender: TObject); + Procedure OnFilter(Sender: TObject); + Procedure OnFilterClose(Sender: TObject); + Procedure OnSortBy(Sender: TObject); + Procedure OnChooseVisibleFields(Sender: TObject); public + procedure FilterRec(DataSet : TDataSet;var Accept: Boolean); + constructor Create(AOwner: TComponent); override; destructor Destroy; override; function EditorByStyle(Style: TColumnButtonStyle): TWinControl; override; @@ -331,6 +372,9 @@ type procedure OptimizeColumnsWidthAll; procedure UpdateTitleHight; property QuickUTF8Search:String read FQuickUTF8Search write SetQuickUTF8Search; + + procedure GetOnCreateLookup; + procedure GetOnDisplayLookup; published property AfterQuickSearch: TRxQuickSearchNotifyEvent read FAfterQuickSearch write FAfterQuickSearch; property BeforeQuickSearch: TRxQuickSearchNotifyEvent read FBeforeQuickSearch write FBeforeQuickSearch; @@ -429,13 +473,16 @@ type property OnTitleClick; property OnUserCheckboxBitmap; property OnUTF8KeyPress; + + property OnCreateLookup: TCreateLookup read F_CreateLookup write F_CreateLookup; + property OnDisplayLookup: TDisplayLookup read F_DisplayLookup write F_DisplayLookup; end; procedure RegisterExDBGridSortEngine(ExDBGridSortEngineClass:TExDBGridSortEngineClass; DataSetClass:TDataSetClass); implementation uses Math, rxdconst, rxstrutils, rxdbgrid_findunit, rxdbgrid_columsunit, - rxlookup, tooledit, LCLProc; + rxlookup, tooledit, LCLProc, rxfilterby, rxsortby; var ExDBGridSortEngineList:TStringList; @@ -474,6 +521,7 @@ type procedure KeyDown(var Key : Word; Shift : TShiftState); override; procedure msg_SetGrid(var Msg: TGridMessage); message GM_SETGRID; procedure msg_SetValue(var Msg: TGridMessage); message GM_SETVALUE; + procedure ShowList; override; public constructor Create(AOwner: TComponent); override; destructor Destroy; override; @@ -665,6 +713,20 @@ begin FGrid.KeyDown(Key, shift); end; +procedure doEditorKeyDown; +begin + if FGrid<>nil then + FGrid.EditorkeyDown(Self, key, shift); +end; + +function GetFastEntry: boolean; +begin + if FGrid<>nil then + Result := FGrid.FastEditing + else + Result := False; +end; + begin case Key of VK_UP, @@ -674,6 +736,18 @@ begin doGridKeyDown; exit; end; + VK_LEFT, VK_RIGHT: + if GetFastEntry then + begin + doGridKeyDown; + exit; + end; + else + begin + inherited KeyDown(Key, Shift); + doEditorKeyDown; + exit; + end; end; inherited KeyDown(Key, Shift); end; @@ -694,13 +768,20 @@ begin DataSource:=FGrid.DataSource; if Assigned(F) then begin - DataField:=F.FieldName; +// DataField:=F.FieldName; + DataField:=F.KeyFields; LookupDisplay:=F.LookupResultField; LookupField:=F.LookupKeyFields; FLDS.DataSet:=F.LookupDataSet; + FGrid.GetOnCreateLookup; end; end; +procedure TRxDBGridLookupComboEditor.ShowList; +begin + FGrid.GetOnDisplayLookup; + inherited ShowList; +end; constructor TRxDBGridLookupComboEditor.Create(AOwner: TComponent); begin @@ -1081,6 +1162,16 @@ begin OutCaptionCellText(aCol, aRow, aRect, aState, MLI.Caption); end; +procedure TRxDBGrid.UpdateJMenuStates; +begin + F_PopupMenu.Items[0].Enabled:=rdgAllowDialogFind in FOptionsRx; + F_PopupMenu.Items[1].Enabled:=rdgAllowFilterForm in FOptionsRx; +// F_PopupMenu.Items[2].Enabled:=rdgFilter in FOptionsRx; + F_PopupMenu.Items[3].Enabled:=(rdgFilter in FOptionsRx) or (rdgAllowFilterForm in FOptionsRx); + F_PopupMenu.Items[5].Enabled:=rdgAllowSortForm in FOptionsRx; + F_PopupMenu.Items[6].Enabled:=rdgAllowColumnsForm in FOptionsRx; +end; + procedure TRxDBGrid.OnIniSave(Sender: TObject); var i:integer; @@ -1168,18 +1259,6 @@ end; procedure TRxDBGrid.DefaultDrawTitle(aCol, aRow: Integer; aRect: TRect; aState: TGridDrawState); - { procedure FixRectangle; - begin - case Canvas.TextStyle.Alignment of - Classes.taLeftJustify: Inc(aRect.Left, 3); - Classes.taRightJustify: Dec(aRect.Right, 3); - end; - case Canvas.TextStyle.Layout of - tlTop: Inc(aRect.Top, 3); - tlBottom: Dec(aRect.Bottom, 3); - end; - end;} - var ASortMarker: TSortMarker; Background: TColor; @@ -1422,7 +1501,16 @@ var FBackground: TColor; begin if (gdFixed in aState) and (aRow=0) then - DefaultDrawCellA(aCol, aRow, aRect, aState) + begin + DefaultDrawCellA(aCol, aRow, aRect, aState); + if (ARect.Top<=0) and (aCol=0) and (aRow=0) and (DatalinkActive) and (DataSource.DataSet.State = dsBrowse) then + begin + F_TopRect := ARect; + Canvas.Lock; + Canvas.Draw((ARect.Left+ARect.Right-F_MenuBMP.Width) div 2,(ARect.Top + ARect.Bottom - F_MenuBMP.Height) div 2, F_MenuBMP); + Canvas.UnLock; + end; + end else if not ((gdFixed in aState) or (aCol=0) or (aRow=0)) then begin @@ -1476,6 +1564,55 @@ begin end; FSortField:=nil; FSortOrder:=smNone; + + F_SortListField.Clear; + if not (csDestroying in ComponentState) and not (csDesigning in ComponentState) then + begin + if Value then + begin + if DataSource.DataSet.OnFilterRecord<>@FilterRec then + begin + F_EventOnFilterRec:=DataSource.DataSet.OnFilterRecord; + DataSource.DataSet.OnFilterRecord:=@FilterRec; + end; + if DataSource.DataSet.BeforeDelete<>@BeforeDel then + begin + F_EventOnBeforeDelete:=DataSource.DataSet.BeforeDelete; + DataSource.DataSet.BeforeDelete:=@BeforeDel; + end; + if DataSource.DataSet.BeforePost<>@BeforePo then + begin + F_EventOnBeforePost:=DataSource.DataSet.BeforePost; + DataSource.DataSet.BeforePost:=@BeforePo; + end; + if DataSource.DataSet.OnDeleteError<>@ErrorDel then + begin + F_EventOnDeleteError:=DataSource.DataSet.OnDeleteError; + DataSource.DataSet.OnDeleteError:=@ErrorDel; + end; + if DataSource.DataSet.OnPostError<>@ErrorPo then + begin + F_EventOnPostError:=DataSource.DataSet.OnPostError; + DataSource.DataSet.OnPostError:=@ErrorPo; + end; + CalcStatTotals; + end + else + begin + DataSource.DataSet.OnFilterRecord:=F_EventOnFilterRec; + F_EventOnFilterRec:=nil; + DataSource.DataSet.BeforeDelete:=F_EventOnBeforeDelete; + F_EventOnBeforeDelete:=nil; + DataSource.DataSet.BeforePost:=F_EventOnBeforePost; + F_EventOnBeforePost:=nil; + DataSource.DataSet.OnDeleteError:=F_EventOnDeleteError; + F_EventOnDeleteError:=nil; + DataSource.DataSet.OnPostError:=F_EventOnPostError; + F_EventOnPostError:=nil; + OptionsRx:=OptionsRx - [rdgFilter]; + F_LastFilter.Clear; + end; + end; end; procedure TRxDBGrid.DrawFooterRows; @@ -1592,6 +1729,21 @@ var // dump : integer; begin Cell := MouseCoord(X, Y); + if (DatalinkActive) And (DataSource.DataSet.State = dsBrowse) And (Button = mbLeft) And (Cell.X =0 ) And (Cell.Y = 0) And (dgIndicator in Options) then + begin + F_Clicked := True; + Rect := F_TopRect; + Canvas.Brush.Color := FixedColor; + Canvas.FillRect(Rect); + if (dgColLines in Options) Then + begin + InflateRect(Rect, 1, 1); + DrawEdge(Canvas.Handle, Rect, BDR_RAISEDINNER, BF_FLAT); + DrawEdge(Canvas.Handle, Rect, BDR_RAISEDINNER, BF_FLAT); + end; + Canvas.Draw(((Rect.Left+Rect.Right-F_MenuBMP.Width) div 2)+1,((Rect.Top + Rect.Bottom - F_MenuBMP.Height) div 2)+1, F_MenuBMP); + end; + if (Cell.Y=0) and (Cell.X >= ord(dgIndicator in Options)) then begin if (rdgFilter in OptionsRx) and DatalinkActive then @@ -1684,7 +1836,13 @@ var Cell: TGridCoord; ACol: Longint; DoClick: Boolean; + + ShowMenu : Boolean; + MPT : TPoint; + Rct : TRect; begin + ShowMenu := False; + FColumnResizing := false; if (dgHeaderPushedLook in Options) and FTracking and (FPressedCol <> nil) then @@ -1702,7 +1860,10 @@ begin begin FPressedCol := ColumnFromGridColumn(Cell.X) as TColumn; if Assigned(FPressedCol) then + begin + F_SortListField.Clear; DoTitleClick(FPressedCol.Index, FPressedCol.Field); + end; end; end; end @@ -1712,7 +1873,36 @@ begin MouseCapture := False; if Button = mbRight then Button := mbLeft; end; + + if (DatalinkActive) And (DataSource.DataSet.State = dsBrowse) then + begin + Cell := MouseCoord(X,Y); + if ((Button = mbLeft) and (Cell.X =0 ) and (Cell.Y = 0) And (dgIndicator in Options)) Or (F_Clicked) then + begin + Rct := F_TopRect; + Canvas.Brush.Color := FixedColor; + Canvas.FillRect(Rct); + if (dgColLines in Options) Then + begin + DrawEdge(Canvas.Handle, Rct, BDR_RAISEDINNER, BF_BOTTOMRIGHT); + DrawEdge(Canvas.Handle, Rct, BDR_RAISEDINNER, BF_TOPLEFT); + end; + F_Clicked := False; + ShowMenu := True; + Button:=mbRight; + end; + end; inherited MouseUp(Button, Shift, X, Y); + + if (DatalinkActive) and (DataSource.DataSet.State = dsBrowse) and (ShowMenu) then + begin + MPT.X := F_TopRect.Left; + MPT.Y := F_TopRect.Bottom; + MPT := ClientToScreen(MPT); + DrawCell(0,0,F_TopRect,[gdFixed]); + UpdateJMenuStates; + F_PopupMenu.Popup(MPT.X,MPT.Y); + end; end; procedure TRxDBGrid.SetQuickUTF8Search(AValue : String); @@ -1796,6 +1986,52 @@ begin end; VK_DELETE:if not (aoDelete in FAllowedOperations) then exit; VK_INSERT:if not (aoInsert in FAllowedOperations) then exit; + + ord('T'):begin + if ssCtrl in Shift then + begin + OnFilterBy(Self); + exit; + end; + end; + ord('E'):begin + if ssCtrl in Shift then + begin + OnFilter(Self); + exit; + end; + end; + ord('Q'):begin + if ssCtrl in Shift then + begin + OnFilterClose(Self); + exit; + end; + end; + ord('C'):begin + if ssCtrl in Shift then + begin + OnSortBy(Self); + exit; + end; + end; + VK_RETURN:if (aoAppend in FAllowedOperations) and (EditorMode) and (Col=ColCount-1) and (Row=RowCount-1) then + if DataSource.DataSet.State=dsInsert then + begin + DataSource.DataSet.Post; + Col:=0; + Key:=VK_DOWN; + inherited KeyDown(Key, Shift); + exit; + end + else + begin + Col:=0; + Key:=VK_DOWN; + inherited KeyDown(Key, Shift); + exit; + end; + VK_DOWN:if not (aoAppend in FAllowedOperations) then begin FTmpReadOnly:=ReadOnly; @@ -1884,6 +2120,11 @@ procedure TRxDBGrid.UpdateActive; begin if FInProcessCalc>0 then exit; inherited UpdateActive; + if FInProcessCalc<0 then + begin + FInProcessCalc:=0; + CalcStatTotals; + end; { if (rdgFooterRows in OptionsRx) and (FooterRowCount > 0) then CalcStatTotals;} end; @@ -1931,6 +2172,10 @@ begin else Value := FFilterListEditor.Text end; + + DataSource.DataSet.Refresh; + CalcStatTotals; + if Assigned(FOnFiltred) then FOnFiltred(Self); end; @@ -2034,10 +2279,10 @@ begin P := Ds.GetBookMark; DS.DisableControls; try + DS.First; for i:=0 to Columns.Count - 1 do TRxColumn(Columns[i]).Footer.ResetTestValue; - DS.First; while not DS.EOF do begin for i:=0 to Columns.Count - 1 do @@ -2100,6 +2345,207 @@ begin CalcTitle; end; +procedure TRxDBGrid.FilterRec(DataSet : TDataSet;var Accept: Boolean); +var + i:integer; +begin + Accept:=true; + for i:=0 to Columns.Count-1 do + begin + with TRxColumn(Columns[i]) do + if (Filter.Value<>'') and (Filter.Value<>Field.AsString) then + begin + Accept:=false; + break; + end; + end; + if Assigned(F_EventOnFilterRec) then + F_EventOnFilterRec(DataSet,Accept); +end; + +procedure TRxDBGrid.BeforeDel(DataSet: TDataSet); +var + i:integer; +begin + if (rdgFooterRows in OptionsRx) and (DatalinkActive) then + for i:=0 to Columns.Count - 1 do + if not TRxColumn(Columns[i]).Footer.DeleteTestValue then + begin + FInProcessCalc:=-1; + Break; + end; + if Assigned(F_EventOnBeforeDelete) then + F_EventOnBeforeDelete(DataSet); +end; + +procedure TRxDBGrid.BeforePo(DataSet: TDataSet); +var + i:integer; +begin + if (rdgFooterRows in OptionsRx) and (DatalinkActive) then + for i:=0 to Columns.Count - 1 do + if not TRxColumn(Columns[i]).Footer.PostTestValue then + begin + FInProcessCalc:=-1; + Break; + end; + if Assigned(F_EventOnBeforePost) then + F_EventOnBeforePost(DataSet); +end; + +procedure TRxDBGrid.ErrorDel(DataSet: TDataSet; E: EDatabaseError;var DataAction: TDataAction); +var + i:integer; +begin + if (rdgFooterRows in OptionsRx) and (DatalinkActive) then + for i:=0 to Columns.Count - 1 do + if not TRxColumn(Columns[i]).Footer.ErrorTestValue then + begin + FInProcessCalc:=-1; + Break; + end; + if Assigned(F_EventOnDeleteError) then + F_EventOnDeleteError(DataSet,E,DataAction); +end; + +procedure TRxDBGrid.ErrorPo(DataSet: TDataSet; E: EDatabaseError;var DataAction: TDataAction); +var + i:integer; +begin + if (rdgFooterRows in OptionsRx) and (DatalinkActive) then + for i:=0 to Columns.Count - 1 do + if not TRxColumn(Columns[i]).Footer.ErrorTestValue then + begin + FInProcessCalc:=-1; + Break; + end; + if Assigned(F_EventOnPostError) then + F_EventOnPostError(DataSet,E,DataAction); +end; + +procedure TRxDBGrid.OnFind(Sender: TObject); +begin + if rdgAllowDialogFind in OptionsRx then + ShowFindDialog; +end; + +procedure TRxDBGrid.OnFilterBy(Sender: TObject); +var + NewFilter : String; +begin + if DataLinkActive then + begin + OptionsRx:=OptionsRx - [rdgFilter]; + rxFilterByForm:=TrxFilterByForm.Create(Application); + NewFilter:=DataSource.DataSet.Filter; + if rxFilterByForm.Execute(DataSource.DataSet, NewFilter, F_LastFilter) then + begin + if NewFilter <> '' then + begin + DataSource.DataSet.Filter := NewFilter; + DataSource.DataSet.Filtered := True; + end + else + begin + DataSource.DataSet.Filtered := False; + end; + CalcStatTotals; + end; + FreeAndNil(rxFilterByForm); + end; +End; + +procedure TRxDBGrid.OnFilter(Sender: TObject); +var + C:TRxColumn; + i:integer; +begin + OptionsRx:=OptionsRx + [rdgFilter]; + + for i:=0 to Columns.Count-1 do + begin + C:=TRxColumn(Columns[i]); + C.Filter.ValueList.Clear; + C.Filter.Value:=''; + C.Filter.ItemIndex:=-1; + C.Filter.ValueList.Add(C.Filter.EmptyValue); + end; + + DataSource.DataSet.DisableControls; + DataSource.DataSet.Filtered:=true; + DataSource.DataSet.First; + while not DataSource.DataSet.EOF do + begin + for i:=0 to Columns.Count-1 do + begin + C:=TRxColumn(Columns[i]); + if (C.Field<>nil) and (C.Filter.ValueList.IndexOf(C.Field.AsString)<0) then + C.Filter.ValueList.Add(C.Field.AsString); + end; + DataSource.DataSet.Next; + end; + DataSource.DataSet.First; + DataSource.DataSet.EnableControls; +End; + +procedure TRxDBGrid.OnFilterClose(Sender: TObject); +var + C:TRxColumn; + i:integer; +Begin + OptionsRx:=OptionsRx - [rdgFilter]; + DataSource.DataSet.Filtered:=false; + CalcStatTotals; +End; + +Procedure TRxDBGrid.OnSortBy(Sender: TObject); +var + i:integer; + s:string; + o:boolean; +begin + if DatalinkActive then + begin + FSortField:=nil; + rxSortByForm:=TrxSortByForm.Create(Application); + o:=not (FSortOrder=smDown); + if rxSortByForm.Execute(DataSource.DataSet,F_SortListField,o) then + begin + for i:=0 to F_SortListField.Count-1 do + begin + s:=s+F_SortListField.Strings[i]+';'; + end; + s:=Copy(s,1,Length(s)-1); + if o then + FSortOrder:=smUp + else + FSortOrder:=smDown; + FSortEngine.SortList(s, DataSource.DataSet, o); + end; + FreeAndNil(rxSortByForm); +// Paint; + Invalidate; + end; +end; + +Procedure TRxDBGrid.OnChooseVisibleFields(Sender: TObject); +begin + if rdgAllowColumnsForm in OptionsRx then + ShowColumnsDialog; +end; + +Procedure TRxDBGrid.GetOnCreateLookup; +begin + if Assigned(F_CreateLookup) then + F_CreateLookup(FRxDbGridLookupComboEditor); +end; + +Procedure TRxDBGrid.GetOnDisplayLookup; +begin + if Assigned(F_DisplayLookup) then + F_DisplayLookup(FRxDbGridLookupComboEditor); +end; +//!!! constructor TRxDBGrid.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -2109,6 +2555,54 @@ begin FMarkerUp := LoadLazResBitmapImage('rx_markerup'); FMarkerDown := LoadLazResBitmapImage('rx_markerdown'); + Options:=Options - [dgTabs]; + OptionsRx:=OptionsRx + [rdgAllowColumnsForm]+[rdgAllowDialogFind]; + + FAutoSort:=True; +// FTitleButtons:=True; + + F_Clicked := False; + F_MenuBMP := TBitmap.Create; + F_MenuBMP := LoadLazResBitmapImage('menu_grid'); + + F_PopupMenu := TPopupMenu.Create(Self); + F_PopupMenu.Name := 'OptionsMenu'; + + F_PopupMenu.Items.Insert(0,TMenuItem.Create(F_PopupMenu)); + F_PopupMenu.Items[0].Caption :=sRxDBGridFind; + F_PopupMenu.Items[0].ShortCut:=KeyToShortCut(ord('F'), [ssCtrl]); + F_PopupMenu.Items[0].OnClick :=@OnFind; + + F_PopupMenu.Items.Insert(1,TMenuItem.Create(F_PopupMenu)); + F_PopupMenu.Items[1].Caption :=sRxDBGridFilter; + F_PopupMenu.Items[1].ShortCut:=KeyToShortCut(ord('T'), [ssCtrl]); + F_PopupMenu.Items[1].OnClick := @OnFilterBy; + + F_PopupMenu.Items.Insert(2,TMenuItem.Create(F_PopupMenu)); + F_PopupMenu.Items[2].Caption :=sRxDBGridFilterSimple; + F_PopupMenu.Items[2].ShortCut:=KeyToShortCut(ord('E'), [ssCtrl]); + F_PopupMenu.Items[2].OnClick := @OnFilter; + + F_PopupMenu.Items.Insert(3,TMenuItem.Create(F_PopupMenu)); + F_PopupMenu.Items[3].Caption :=sRxDBGridFilterClear; + F_PopupMenu.Items[3].ShortCut:=KeyToShortCut(ord('Q'), [ssCtrl]); + F_PopupMenu.Items[3].OnClick := @OnFilterClose; + + F_PopupMenu.Items.Insert(4,TMenuItem.Create(F_PopupMenu)); + F_PopupMenu.Items[4].Caption :='-'; + + F_PopupMenu.Items.Insert(5,TMenuItem.Create(F_PopupMenu)); + F_PopupMenu.Items[5].Caption :=sRxDBGridSortByColumns; + F_PopupMenu.Items[5].ShortCut:=KeyToShortCut(ord('C'), [ssCtrl]); + F_PopupMenu.Items[5].OnClick := @OnSortBy; + + F_PopupMenu.Items.Insert(6,TMenuItem.Create(F_PopupMenu)); + F_PopupMenu.Items[6].Caption :=sRxDBGridSelectColumns; + F_PopupMenu.Items[6].ShortCut:=KeyToShortCut(ord('W'), [ssCtrl]); + F_PopupMenu.Items[6].OnClick := @OnChooseVisibleFields; + + F_LastFilter := TStringList.Create; + F_SortListField := TStringList.Create; FPropertyStorageLink:=TPropertyStorageLink.Create; FPropertyStorageLink.OnSave:=@OnIniSave; @@ -2117,7 +2611,8 @@ begin // FTitleLines := TITLE_DEFAULT; FAllowedOperations:=[aoInsert, aoUpdate, aoDelete, aoAppend]; - FFooterColor:=clWindow; +// FFooterColor:=clWindow; + FFooterColor:=clYellow; FFooterRowCount:=0; FFilterListEditor := TFilterListCellEditor.Create(nil); @@ -2150,6 +2645,12 @@ begin FreeAndNil(FMarkerUp); FreeAndNil(FPropertyStorageLink); FreeAndNil(FFilterListEditor); + + FreeAndNil(F_PopupMenu); + FreeAndNil(F_MenuBMP); + FreeAndNil(F_LastFilter); + FreeAndNil(F_SortListField); + inherited Destroy; end; @@ -2461,7 +2962,9 @@ function TRxColumnFooter.GetStatTotal: string; var F:TField; begin - if (FFieldName<>'') and TRxDBGrid(FOwner.Grid).DatalinkActive then + if (FFieldName<>'') and TRxDBGrid(FOwner.Grid).DatalinkActive + and (TRxDBGrid(FOwner.Grid).DataSource.DataSet.RecordCount<>0) + then begin F:=TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); if Assigned(F) then @@ -2474,6 +2977,9 @@ begin if FValueType in [fvtSum, fvtAvg] then Result:='' else + if FTestValue=0 then + Result:='' + else if FDisplayFormat = '' then Result:=DateToStr(FTestValue) else @@ -2509,8 +3015,20 @@ begin end; procedure TRxColumnFooter.ResetTestValue; +var + F:TField; begin FTestValue:=0; + + if (ValueType=fvtMin) and (TRxDBGrid(FOwner.Grid).DataSource.DataSet.RecordCount<>0) then + begin + F:=TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); + if (Assigned(F)) and not (F.IsNull) then + if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then + FTestValue:=F.AsDateTime + else + FTestValue:=F.AsFloat; + end; end; procedure TRxColumnFooter.UpdateTestValue; @@ -2542,6 +3060,132 @@ begin end; end; +function TRxColumnFooter.DeleteTestValue: boolean; +var + F:TField; +begin + Result:=true; + if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then + begin + F:=TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); + if (Assigned(F)) and not (F.IsNull) then + if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then + Result:=not ((FValueType in [fvtMax, fvtMin]) and (FTestValue=F.AsDateTime)) + else + if FValueType in [fvtMax, fvtMin] then + Result:=(FTestValue<>F.AsFloat) + else + FTestValue:=FTestValue-F.AsFloat; + end; +end; + +function TRxColumnFooter.PostTestValue: boolean; +var + F:TField; +begin + Result:=true; + if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then + begin + F:=TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); + if Assigned(F) then + if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then + begin + if FValueType in [fvtMax, fvtMin] then + if F.DataSet.State=dsinsert then + begin + if not (F.IsNull) then + case FValueType of + fvtMax:FTestValue:=Max(FTestValue, F.AsDateTime); + fvtMin:FTestValue:=Min(FTestValue, F.AsDateTime); + end + end + else + if (F.OldValue<>null) and (FTestValue=TDateTime(F.OldValue)) then + Result:=false + else + if not F.IsNull then + case FValueType of + fvtMax:FTestValue:=Max(FTestValue, F.AsDateTime); + fvtMin:FTestValue:=Min(FTestValue, F.AsDateTime); + end; + end + else + if F.DataSet.State=dsinsert then + begin + if not F.IsNull then + case FValueType of + fvtSum:FTestValue:=FTestValue+F.AsFloat; + fvtMax:FTestValue:=Max(FTestValue, F.AsFloat); + fvtMin:FTestValue:=Min(FTestValue, F.AsFloat); + end; + end + else + if (FValueType in [fvtMax, fvtMin]) and (F.OldValue<>null) and (FTestValue=Float(F.OldValue)) then + Result:=false + else + case FValueType of + fvtSum: + begin + if F.OldValue<>null then + FTestValue:=FTestValue-Float(F.OldValue); + if not F.IsNull then + FTestValue:=FTestValue+F.AsFloat; + end; + fvtMax:if not F.IsNull then FTestValue:=Max(FTestValue, F.AsFloat); + fvtMin:if not F.IsNull then FTestValue:=Min(FTestValue, F.AsFloat); + end; + end; +end; + +function TRxColumnFooter.ErrorTestValue: boolean; +var + F:TField; +begin + Result:=true; + if ValueType in [fvtSum, fvtAvg, fvtMax, fvtMin] then + begin + F:=TRxDBGrid(FOwner.Grid).DataSource.DataSet.FieldByName(FFieldName); + if Assigned(F) then + if F.DataType in [ftDate, ftTime, ftDateTime, ftTimeStamp] then + begin + if FValueType in [fvtMax, fvtMin] then + if not (F.IsNull) and (FTestValue=F.AsDateTime) then + Result:=false + else + if (F.DataSet.RecordCount<>0) and (F.OldValue<>null) then + case FValueType of + fvtMax:FTestValue:=Max(FTestValue, TDateTime(F.OldValue)); + fvtMin:FTestValue:=Min(FTestValue, TDateTime(F.OldValue)); + end; + end + else + if (FValueType in [fvtMax, fvtMin]) and not (F.IsNull) and (FTestValue=F.AsFloat) then + Result:=false + else + case FValueType of + fvtSum: + if F.DataSet.RecordCount=0 then + begin + if not F.IsNull then + FTestValue:=FTestValue-F.AsFloat + end + else + begin + if F.OldValue<>null then + FTestValue:=FTestValue+Float(F.OldValue); + if not F.IsNull then + FTestValue:=FTestValue-F.AsFloat; + end; + fvtMax: + if (F.DataSet.RecordCount<>0) and (F.OldValue<>null) then + FTestValue:=Max(FTestValue, Float(F.OldValue)); + fvtMin: + if (F.DataSet.RecordCount<>0) and (F.OldValue<>null) then + FTestValue:=Min(FTestValue, Float(F.OldValue)); + end; + end; +end; +///! constructor TRxColumnFooter.Create(Owner: TRxColumn); begin inherited Create; @@ -2633,6 +3277,11 @@ begin FEmptyFont := TFont.Create; FValueList := TStringList.Create; FColor := clWhite; + +// FColor := clSkyBlue; + FEmptyFont.Style:=[fsItalic]; + FEmptyValue:=sRxDBGridEmptiFilter; + FFont.Style:=[fsItalic]; end; destructor TRxColumnFilter.Destroy; @@ -2643,6 +3292,14 @@ begin inherited Destroy; end; +{ TExDBGridSortEngine } + +procedure TExDBGridSortEngine.SortList(ListField: string; ADataSet: TDataSet; + Asc: boolean); +begin + +end; + initialization {$I rxdbgrid.lrs} // {$I rx_markerdown.lrs} diff --git a/components/rx/rxdbgrid_columsunit.lfm b/components/rx/rxdbgrid_columsunit.lfm index b9ba93c2c..c15cce8f2 100644 --- a/components/rx/rxdbgrid_columsunit.lfm +++ b/components/rx/rxdbgrid_columsunit.lfm @@ -1,91 +1,138 @@ object rxDBGridColumsForm: TrxDBGridColumsForm - Left = 492 - Height = 296 - Top = 264 - Width = 355 - HorzScrollBar.Page = 354 - VertScrollBar.Page = 295 + Left = 489 + Height = 375 + Top = 248 + Width = 448 + ActiveControl = CheckListBox1 Caption = 'Grid colums' - ClientHeight = 296 - ClientWidth = 355 - PixelsPerInch = 96 - object SpeedButton1: TSpeedButton - Left = 8 - Height = 22 - Top = 260 - Width = 23 - Color = clBtnFace - Glyph.Data = { - 9B0100002F2A2058504D202A2F0A7374617469632063686172202A506F696E74 - 55505B5D3D7B0A22313620313620332031222C0A222E2063204E6F6E65222C0A - 222320632023303030303030222C0A226120632023303038303830222C0A222E - 2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E - 2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E - 2E2E2E232E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2361232E2E2E2E2E2E22 - 2C0A222E2E2E2E2E2E23616161232E2E2E2E2E222C0A222E2E2E2E2E23616161 - 6161232E2E2E2E222C0A222E2E2E2E2361616161616161232E2E2E222C0A222E - 2E2E23232323616161232323232E2E222C0A222E2E2E2E2E2E23616161232E2E - 2E2E2E222C0A222E2E2E2E2E2E23616161232E2E2E2E2E222C0A222E2E2E2E2E - 2E23616161232E2E2E2E2E222C0A222E2E2E2E2E2E23232323232E2E2E2E2E22 - 2C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E - 2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D3B0A - } - NumGlyphs = 0 - end - object SpeedButton2: TSpeedButton - Left = 40 - Height = 22 - Top = 260 - Width = 23 - Color = clBtnFace - Glyph.Data = { - 9D0100002F2A2058504D202A2F0A7374617469632063686172202A506F696E74 - 446F776E5B5D3D7B0A22313620313620332031222C0A222E2063204E6F6E6522 - 2C0A222320632023303030303030222C0A226120632023303038303830222C0A - 222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E - 2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E - 2E2E2E23232323232E2E2E2E2E222C0A222E2E2E2E2E2E23616161232E2E2E2E - 2E222C0A222E2E2E2E2E2E23616161232E2E2E2E2E222C0A222E2E2E2E2E2E23 - 616161232E2E2E2E2E222C0A222E2E2E23232323616161232323232E2E222C0A - 222E2E2E2E2361616161616161232E2E2E222C0A222E2E2E2E2E236161616161 - 232E2E2E2E222C0A222E2E2E2E2E2E23616161232E2E2E2E2E222C0A222E2E2E - 2E2E2E2E2361232E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E232E2E2E2E2E2E - 2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E - 2E2E2E2E2E2E2E2E2E222C0A222E2E2E2E2E2E2E2E2E2E2E2E2E2E2E2E227D3B - 0A - } - NumGlyphs = 0 - end + ClientHeight = 375 + ClientWidth = 448 + OnCreate = FormCreate + Position = poScreenCenter + ShowHint = True + LCLVersion = '0.9.27' object CheckListBox1: TCheckListBox - Left = 8 - Height = 238 - Top = 8 - Width = 340 - Anchors = [akTop, akLeft, akRight] + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = ButtonPanel1 + Left = 6 + Height = 315 + Top = 6 + Width = 436 + Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 + ItemHeight = 0 TabOrder = 0 + TopIndex = -1 end - object Button1: TButton - Left = 195 - Height = 30 - Top = 258 - Width = 75 - Anchors = [akRight, akBottom] - BorderSpacing.InnerBorder = 2 - Caption = 'OK' - Default = True - ModalResult = 1 + object ButtonPanel1: TButtonPanel + Left = 6 + Height = 42 + Top = 327 + Width = 436 TabOrder = 1 - end - object Button2: TButton - Left = 273 - Height = 30 - Top = 258 - Width = 75 - Anchors = [akRight, akBottom] - BorderSpacing.InnerBorder = 2 - Cancel = True - Caption = 'Cancel' - ModalResult = 2 - TabOrder = 2 + ShowButtons = [pbOK, pbCancel, pbHelp] + object SpeedButton2: TSpeedButton + AnchorSideLeft.Control = SpeedButton1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = SpeedButton1 + AnchorSideBottom.Control = SpeedButton1 + AnchorSideBottom.Side = asrBottom + Left = 143 + Height = 34 + Top = 0 + Width = 23 + Anchors = [akTop, akLeft, akBottom] + BorderSpacing.Left = 6 + Color = clBtnFace + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000FF808000FF0000 + 00FF000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF808000FF808000FF8080 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000FF808000FF808000FF808000FF8080 + 00FF808000FF000000FF00000000000000000000000000000000000000000000 + 00000000000000000000000000FF808000FF808000FF808000FF808000FF8080 + 00FF808000FF808000FF000000FF000000000000000000000000000000000000 + 000000000000000000FF000000FF000000FF000000FF808000FF808000FF8080 + 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 + 000000000000000000000000000000000000000000FF808000FF808000FF8080 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF808000FF808000FF8080 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF808000FF808000FF8080 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000 + } + NumGlyphs = 0 + end + object SpeedButton1: TSpeedButton + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ButtonPanel1 + AnchorSideBottom.Side = asrBottom + Left = 114 + Height = 34 + Top = 0 + Width = 23 + Anchors = [akTop, akLeft, akBottom] + BorderSpacing.Left = 18 + Color = clBtnFace + Glyph.Data = { + 36040000424D3604000000000000360000002800000010000000100000000100 + 2000000000000004000064000000640000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF000000FF000000FF0000 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF808000FF808000FF8080 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF808000FF808000FF8080 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF808000FF808000FF8080 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 000000000000000000FF000000FF000000FF000000FF808000FF808000FF8080 + 00FF000000FF000000FF000000FF000000FF0000000000000000000000000000 + 00000000000000000000000000FF808000FF808000FF808000FF808000FF8080 + 00FF808000FF808000FF000000FF000000000000000000000000000000000000 + 0000000000000000000000000000000000FF808000FF808000FF808000FF8080 + 00FF808000FF000000FF00000000000000000000000000000000000000000000 + 000000000000000000000000000000000000000000FF808000FF808000FF8080 + 00FF000000FF0000000000000000000000000000000000000000000000000000 + 00000000000000000000000000000000000000000000000000FF808000FF0000 + 00FF000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000FF0000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000000000000000 + 0000000000000000000000000000000000000000000000000000 + } + NumGlyphs = 0 + end end end diff --git a/components/rx/rxdbgrid_columsunit.lrs b/components/rx/rxdbgrid_columsunit.lrs index f0a50773a..7149348bc 100644 --- a/components/rx/rxdbgrid_columsunit.lrs +++ b/components/rx/rxdbgrid_columsunit.lrs @@ -1,34 +1,91 @@ { - , lazarus } LazarusResources.Add('TrxDBGridColumsForm','FORMDATA',[ - 'TPF0'#19'TrxDBGridColumsForm'#18'rxDBGridColumsForm'#4'Left'#3#236#1#6'Heigh' - +'t'#3'('#1#3'Top'#3#8#1#5'Width'#3'c'#1#18'HorzScrollBar.Page'#3'b'#1#18'Ver' - +'tScrollBar.Page'#3''''#1#7'Caption'#6#11'Grid colums'#12'ClientHeight'#3'(' - +#1#11'ClientWidth'#3'c'#1#13'PixelsPerInch'#2'`'#0#12'TSpeedButton'#12'Speed' - +'Button1'#4'Left'#2#8#6'Height'#2#22#3'Top'#3#4#1#5'Width'#2#23#5'Color'#7#9 - +'clBtnFace'#10'Glyph.Data'#10#159#1#0#0#155#1#0#0'/* XPM */'#10'static char ' - +'*PointUP[]={'#10'"16 16 3 1",'#10'". c None",'#10'"# c #000000",'#10'"a c #' - +'008080",'#10'"................",'#10'"................",'#10'".............' - +'...",'#10'"........#.......",'#10'".......#a#......",'#10'"......#aaa#.....' - +'",'#10'".....#aaaaa#....",'#10'"....#aaaaaaa#...",'#10'"...####aaa####..",' - +#10'"......#aaa#.....",'#10'"......#aaa#.....",'#10'"......#aaa#.....",'#10 - +'"......#####.....",'#10'"................",'#10'"................",'#10'"..' - +'.............."};'#10#9'NumGlyphs'#2#0#0#0#12'TSpeedButton'#12'SpeedButton2' - +#4'Left'#2'('#6'Height'#2#22#3'Top'#3#4#1#5'Width'#2#23#5'Color'#7#9'clBtnFa' - +'ce'#10'Glyph.Data'#10#161#1#0#0#157#1#0#0'/* XPM */'#10'static char *PointD' - +'own[]={'#10'"16 16 3 1",'#10'". c None",'#10'"# c #000000",'#10'"a c #00808' - +'0",'#10'"................",'#10'"................",'#10'"................",' - +#10'"......#####.....",'#10'"......#aaa#.....",'#10'"......#aaa#.....",'#10 - +'"......#aaa#.....",'#10'"...####aaa####..",'#10'"....#aaaaaaa#...",'#10'"..' - +'...#aaaaa#....",'#10'"......#aaa#.....",'#10'".......#a#......",'#10'".....' - +'...#.......",'#10'"................",'#10'"................",'#10'"........' - +'........"};'#10#9'NumGlyphs'#2#0#0#0#13'TCheckListBox'#13'CheckListBox1'#4 - +'Left'#2#8#6'Height'#3#238#0#3'Top'#2#8#5'Width'#3'T'#1#7'Anchors'#11#5'akTo' - +'p'#6'akLeft'#7'akRight'#0#8'TabOrder'#2#0#0#0#7'TButton'#7'Button1'#4'Left' - +#3#195#0#6'Height'#2#30#3'Top'#3#2#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8 - +'akBottom'#0#25'BorderSpacing.InnerBorder'#2#2#7'Caption'#6#2'OK'#7'Default' - +#9#11'ModalResult'#2#1#8'TabOrder'#2#1#0#0#7'TButton'#7'Button2'#4'Left'#3#17 - +#1#6'Height'#2#30#3'Top'#3#2#1#5'Width'#2'K'#7'Anchors'#11#7'akRight'#8'akBo' - +'ttom'#0#25'BorderSpacing.InnerBorder'#2#2#6'Cancel'#9#7'Caption'#6#6'Cancel' - +#11'ModalResult'#2#2#8'TabOrder'#2#2#0#0#0 + 'TPF0'#19'TrxDBGridColumsForm'#18'rxDBGridColumsForm'#4'Left'#3#233#1#6'Heigh' + +'t'#3'w'#1#3'Top'#3#248#0#5'Width'#3#192#1#13'ActiveControl'#7#13'CheckListB' + +'ox1'#7'Caption'#6#11'Grid colums'#12'ClientHeight'#3'w'#1#11'ClientWidth'#3 + +#192#1#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'#8'ShowH' + +'int'#9#10'LCLVersion'#6#6'0.9.27'#0#13'TCheckListBox'#13'CheckListBox1'#22 + +'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#23 + +'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom' + +#24'AnchorSideBottom.Control'#7#12'ButtonPanel1'#4'Left'#2#6#6'Height'#3';'#1 + +#3'Top'#2#6#5'Width'#3#180#1#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'a' + +'kBottom'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#8'TabOrder'#2#0#8 + +'TopIndex'#2#255#0#0#12'TButtonPanel'#12'ButtonPanel1'#4'Left'#2#6#6'Height' + +#2'*'#3'Top'#3'G'#1#5'Width'#3#180#1#8'TabOrder'#2#1#11'ShowButtons'#11#4'pb' + +'OK'#8'pbCancel'#6'pbHelp'#0#0#12'TSpeedButton'#12'SpeedButton2'#22'AnchorSi' + +'deLeft.Control'#7#12'SpeedButton1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21 + +'AnchorSideTop.Control'#7#12'SpeedButton1'#24'AnchorSideBottom.Control'#7#12 + +'SpeedButton1'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#143#0#6'He' + +'ight'#2'"'#3'Top'#2#0#5'Width'#2#23#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBo' + +'ttom'#0#18'BorderSpacing.Left'#2#6#5'Color'#7#9'clBtnFace'#10'Glyph.Data'#10 + +':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0'('#0#0#0#16#0#0#0#16#0#0#0#1#0 + +' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#255#128#128#0#255#128#128#0#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128 + +#128#0#255#128#128#0#255#128#128#0#255#128#128#0#255#128#128#0#255#0#0#0#255 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255 + +#128#128#0#255#128#128#0#255#128#128#0#255#128#128#0#255#128#128#0#255#128 + +#128#0#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#255#0#0#0#255#0#0#0#255#0#0#0#255#128#128#0#255#128#128#0#255 + +#128#128#0#255#0#0#0#255#0#0#0#255#0#0#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#128#128#0 + +#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#128#128#0 + +#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#128#128#0 + +#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0#0#255#0#0#0#255#0#0#0 + +#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#9'NumGlyphs'#2#0#0 + +#0#12'TSpeedButton'#12'SpeedButton1'#19'AnchorSideLeft.Side'#7#9'asrBottom' + +#21'AnchorSideTop.Control'#7#12'ButtonPanel1'#21'AnchorSideBottom.Side'#7#9 + +'asrBottom'#4'Left'#2'r'#6'Height'#2'"'#3'Top'#2#0#5'Width'#2#23#7'Anchors' + +#11#5'akTop'#6'akLeft'#8'akBottom'#0#18'BorderSpacing.Left'#2#18#5'Color'#7#9 + +'clBtnFace'#10'Glyph.Data'#10':'#4#0#0'6'#4#0#0'BM6'#4#0#0#0#0#0#0'6'#0#0#0 + +'('#0#0#0#16#0#0#0#16#0#0#0#1#0' '#0#0#0#0#0#0#4#0#0'd'#0#0#0'd'#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0 + +#0#255#0#0#0#255#0#0#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#128 + ,#128#0#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#128 + +#128#0#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#128 + +#128#0#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#0#0#0#255#0#0#0#255#0#0#0#255#128#128#0#255 + +#128#128#0#255#128#128#0#255#0#0#0#255#0#0#0#255#0#0#0#255#0#0#0#255#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#128#128#0 + +#255#128#128#0#255#128#128#0#255#128#128#0#255#128#128#0#255#128#128#0#255#0 + +#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#255#128#128#0#255#128#128#0#255#128#128#0#255#128#128#0#255#128#128#0#255 + +#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#128#128#0#255#128#128#0#255#0#0#0#255 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#255#128#128#0#255#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0 + +#0#0#0#0#9'NumGlyphs'#2#0#0#0#0#0 ]); diff --git a/components/rx/rxdbgrid_columsunit.lrt b/components/rx/rxdbgrid_columsunit.lrt new file mode 100644 index 000000000..f8353c65b --- /dev/null +++ b/components/rx/rxdbgrid_columsunit.lrt @@ -0,0 +1 @@ +TRXDBGRIDCOLUMSFORM.CAPTION=Grid colums diff --git a/components/rx/rxdbgrid_columsunit.pas b/components/rx/rxdbgrid_columsunit.pas index 30f46bab8..3757e3ff3 100644 --- a/components/rx/rxdbgrid_columsunit.pas +++ b/components/rx/rxdbgrid_columsunit.pas @@ -6,18 +6,18 @@ interface uses Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, CheckLst, - StdCtrls, Buttons, rxdbgrid; + StdCtrls, Buttons, ButtonPanel, rxdbgrid; type { TrxDBGridColumsForm } TrxDBGridColumsForm = class(TForm) - Button1: TButton; - Button2: TButton; + ButtonPanel1: TButtonPanel; CheckListBox1: TCheckListBox; SpeedButton1: TSpeedButton; SpeedButton2: TSpeedButton; + procedure FormCreate(Sender: TObject); private FGrid:TRxDBGrid; procedure SetGrid(AGrid:TRxDBGrid); @@ -29,6 +29,7 @@ type procedure ShowRxDBGridColumsForm(Grid:TRxDBGrid); implementation +uses rxdconst; procedure ShowRxDBGridColumsForm(Grid: TRxDBGrid); var @@ -43,6 +44,17 @@ end; { TrxDBGridColumsForm } +procedure TrxDBGridColumsForm.FormCreate(Sender: TObject); +begin + SpeedButton1.AnchorSideLeft.Control:=ButtonPanel1.HelpButton; + SpeedButton1.AnchorSideTop.Control:=ButtonPanel1.HelpButton; + SpeedButton1.AnchorSideBottom.Control:=ButtonPanel1.HelpButton; + + Caption:=sRxDbGridSelColCaption; + SpeedButton1.Hint:=sRxDbGridSelColHint1; + SpeedButton2.Hint:=sRxDbGridSelColHint2; +end; + procedure TrxDBGridColumsForm.SetGrid(AGrid: TRxDBGrid); var i:integer; diff --git a/components/rx/rxdbgrid_findunit.lfm b/components/rx/rxdbgrid_findunit.lfm index b7125530b..73a4165ff 100644 --- a/components/rx/rxdbgrid_findunit.lfm +++ b/components/rx/rxdbgrid_findunit.lfm @@ -1,46 +1,55 @@ object rxDBGridFindForm: TrxDBGridFindForm - Left = 436 - Height = 127 - Top = 423 + Left = 474 + Height = 232 + Top = 384 Width = 493 - HorzScrollBar.Page = 492 - VertScrollBar.Page = 126 - ActiveControl = BtnFind + ActiveControl = Edit1 Caption = 'Find' - ClientHeight = 127 + ClientHeight = 232 ClientWidth = 493 - OnActivate = FormActivate + OnCreate = FormCreate OnShow = FormShow + Position = poDesktopCenter + LCLVersion = '0.9.27' object Label1: TLabel + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner AnchorSideBottom.Control = Edit1 AnchorSideBottom.Side = asrBottom Left = 6 - Height = 14 - Top = 16 - Width = 57 - Anchors = [akLeft, akBottom] + Height = 18 + Top = 6 + Width = 78 + BorderSpacing.Around = 6 Caption = 'Text to find' FocusControl = Edit1 ParentColor = False end object Label2: TLabel - AnchorSideLeft.Control = Label1 + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Edit1 + AnchorSideTop.Side = asrBottom AnchorSideBottom.Control = ComboBox1 AnchorSideBottom.Side = asrBottom Left = 6 - Height = 14 - Top = 45 - Width = 57 - Anchors = [akLeft, akBottom] + Height = 18 + Top = 63 + Width = 80 + BorderSpacing.Around = 6 Caption = 'Find at filed' ParentColor = False end object BtnFind: TButton - Left = 408 - Height = 38 - Top = 8 - Width = 80 - Anchors = [akTop, akRight] + AnchorSideRight.Control = Button2 + AnchorSideBottom.Control = Owner + AnchorSideBottom.Side = asrBottom + Left = 334 + Height = 37 + Top = 189 + Width = 88 + Anchors = [akRight, akBottom] + AutoSize = True + BorderSpacing.Around = 6 BorderSpacing.InnerBorder = 4 Caption = 'Find more' Default = True @@ -50,12 +59,18 @@ object rxDBGridFindForm: TrxDBGridFindForm object Button2: TButton AnchorSideTop.Control = BtnFind AnchorSideTop.Side = asrBottom - Left = 408 - Height = 34 - Top = 54 - Width = 80 - Anchors = [akTop, akRight] + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = Owner + AnchorSideBottom.Side = asrBottom + Left = 428 + Height = 37 + Top = 189 + Width = 59 + Anchors = [akRight, akBottom] + AutoSize = True BorderSpacing.Top = 8 + BorderSpacing.Around = 6 BorderSpacing.InnerBorder = 4 Cancel = True Caption = 'Close' @@ -64,52 +79,61 @@ object rxDBGridFindForm: TrxDBGridFindForm end object Edit1: TEdit AnchorSideLeft.Control = ComboBox1 - Left = 71 - Height = 22 - Top = 8 - Width = 326 + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 18 + Height = 27 + Top = 30 + Width = 469 Anchors = [akTop, akLeft, akRight] - AutoSize = True + BorderSpacing.Around = 6 TabOrder = 0 end object ComboBox1: TComboBox AnchorSideLeft.Control = Label2 - AnchorSideLeft.Side = asrBottom - AnchorSideTop.Control = Edit1 + AnchorSideTop.Control = Label2 AnchorSideTop.Side = asrBottom - AnchorSideRight.Control = Edit1 + AnchorSideRight.Control = Owner AnchorSideRight.Side = asrBottom - Left = 71 - Height = 21 - Top = 38 - Width = 326 + Left = 12 + Height = 31 + Top = 87 + Width = 475 Anchors = [akTop, akLeft, akRight] - AutoCompleteText = [cbactEndOfLineComplete, cbactSearchAscending] - BorderSpacing.Left = 8 - BorderSpacing.Top = 8 - ItemHeight = 13 - MaxLength = 0 + BorderSpacing.Around = 6 + ItemHeight = 0 Style = csDropDownList TabOrder = 1 end object CheckBox1: TCheckBox - AnchorSideLeft.Control = Label1 + AnchorSideLeft.Control = Owner AnchorSideTop.Control = ComboBox1 AnchorSideTop.Side = asrBottom Left = 6 - Height = 13 - Top = 67 - Width = 92 - BorderSpacing.Top = 8 + Height = 21 + Top = 124 + Width = 129 + BorderSpacing.Around = 6 Caption = 'Case sensetive' TabOrder = 2 end object RadioGroup1: TRadioGroup - Left = 232 - Height = 76 - Top = 72 - Width = 150 + AnchorSideLeft.Control = CheckBox1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 141 + Height = 52 + Top = 124 + Width = 346 + Anchors = [akTop, akLeft, akRight] AutoFill = True + AutoSize = True + BorderSpacing.Around = 6 Caption = 'Direction' ChildSizing.LeftRightSpacing = 6 ChildSizing.TopBottomSpacing = 6 @@ -118,9 +142,10 @@ object rxDBGridFindForm: TrxDBGridFindForm ChildSizing.ShrinkHorizontal = crsScaleChilds ChildSizing.ShrinkVertical = crsScaleChilds ChildSizing.Layout = cclLeftToRightThenTopToBottom - ChildSizing.ControlsPerLine = 1 - ClientHeight = 58 - ClientWidth = 146 + ChildSizing.ControlsPerLine = 3 + ClientHeight = 33 + ClientWidth = 342 + Columns = 3 Items.Strings = ( 'All' 'Forward' @@ -130,14 +155,14 @@ object rxDBGridFindForm: TrxDBGridFindForm Visible = False end object CheckBox2: TCheckBox - AnchorSideLeft.Control = Label1 + AnchorSideLeft.Control = Owner AnchorSideTop.Control = CheckBox1 AnchorSideTop.Side = asrBottom Left = 6 - Height = 13 - Top = 88 - Width = 69 - BorderSpacing.Top = 8 + Height = 21 + Top = 151 + Width = 91 + BorderSpacing.Around = 6 Caption = 'Partial key' TabOrder = 3 end diff --git a/components/rx/rxdbgrid_findunit.lrs b/components/rx/rxdbgrid_findunit.lrs index 85e3a11ca..15a2a33fe 100644 --- a/components/rx/rxdbgrid_findunit.lrs +++ b/components/rx/rxdbgrid_findunit.lrs @@ -1,50 +1,62 @@ { - , lazarus } LazarusResources.Add('TrxDBGridFindForm','FORMDATA',[ - 'TPF0'#17'TrxDBGridFindForm'#16'rxDBGridFindForm'#4'Left'#3#180#1#6'Height'#2 - +''#3'Top'#3#167#1#5'Width'#3#237#1#18'HorzScrollBar.Page'#3#236#1#18'VertSc' - +'rollBar.Page'#2'~'#13'ActiveControl'#7#7'BtnFind'#7'Caption'#6#4'Find'#12'C' - +'lientHeight'#2''#11'ClientWidth'#3#237#1#10'OnActivate'#7#12'FormActivate' - +#6'OnShow'#7#8'FormShow'#0#6'TLabel'#6'Label1'#24'AnchorSideBottom.Control'#7 - +#5'Edit1'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#14 - +#3'Top'#2#16#5'Width'#2'9'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Caption'#6 - +#12'Text to find'#12'FocusControl'#7#5'Edit1'#11'ParentColor'#8#0#0#6'TLabel' - +#6'Label2'#22'AnchorSideLeft.Control'#7#6'Label1'#24'AnchorSideBottom.Contro' - +'l'#7#9'ComboBox1'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'He' - +'ight'#2#14#3'Top'#2'-'#5'Width'#2'9'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7 - +'Caption'#6#13'Find at filed'#11'ParentColor'#8#0#0#7'TButton'#7'BtnFind'#4 - +'Left'#3#152#1#6'Height'#2'&'#3'Top'#2#8#5'Width'#2'P'#7'Anchors'#11#5'akTop' - +#7'akRight'#0#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#9'Find more'#7 - +'Default'#9#7'OnClick'#7#12'BtnFindClick'#8'TabOrder'#2#4#0#0#7'TButton'#7'B' - +'utton2'#21'AnchorSideTop.Control'#7#7'BtnFind'#18'AnchorSideTop.Side'#7#9'a' - +'srBottom'#4'Left'#3#152#1#6'Height'#2'"'#3'Top'#2'6'#5'Width'#2'P'#7'Anchor' - +'s'#11#5'akTop'#7'akRight'#0#17'BorderSpacing.Top'#2#8#25'BorderSpacing.Inne' - +'rBorder'#2#4#6'Cancel'#9#7'Caption'#6#5'Close'#7'OnClick'#7#12'Button2Click' - +#8'TabOrder'#2#5#0#0#5'TEdit'#5'Edit1'#22'AnchorSideLeft.Control'#7#9'ComboB' - +'ox1'#4'Left'#2'G'#6'Height'#2#22#3'Top'#2#8#5'Width'#3'F'#1#7'Anchors'#11#5 - +'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#8'TabOrder'#2#0#0#0#9'TComboBox' - +#9'ComboBox1'#22'AnchorSideLeft.Control'#7#6'Label2'#19'AnchorSideLeft.Side' - +#7#9'asrBottom'#21'AnchorSideTop.Control'#7#5'Edit1'#18'AnchorSideTop.Side'#7 - +#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Edit1'#20'AnchorSideRight.Side' - +#7#9'asrBottom'#4'Left'#2'G'#6'Height'#2#21#3'Top'#2'&'#5'Width'#3'F'#1#7'An' - +'chors'#11#5'akTop'#6'akLeft'#7'akRight'#0#16'AutoCompleteText'#11#22'cbactE' - +'ndOfLineComplete'#20'cbactSearchAscending'#0#18'BorderSpacing.Left'#2#8#17 - +'BorderSpacing.Top'#2#8#10'ItemHeight'#2#13#9'MaxLength'#2#0#5'Style'#7#14'c' - +'sDropDownList'#8'TabOrder'#2#1#0#0#9'TCheckBox'#9'CheckBox1'#22'AnchorSideL' - +'eft.Control'#7#6'Label1'#21'AnchorSideTop.Control'#7#9'ComboBox1'#18'Anchor' - +'SideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#13#3'Top'#2'C'#5'Width' - +#2'\'#17'BorderSpacing.Top'#2#8#7'Caption'#6#14'Case sensetive'#8'TabOrder'#2 - +#2#0#0#11'TRadioGroup'#11'RadioGroup1'#4'Left'#3#232#0#6'Height'#2'L'#3'Top' - +#2'H'#5'Width'#3#150#0#8'AutoFill'#9#7'Caption'#6#9'Direction'#28'ChildSizin' - +'g.LeftRightSpacing'#2#6#28'ChildSizing.TopBottomSpacing'#2#6#29'ChildSizing' - +'.EnlargeHorizontal'#7#24'crsHomogenousChildResize'#27'ChildSizing.EnlargeVe' - +'rtical'#7#24'crsHomogenousChildResize'#28'ChildSizing.ShrinkHorizontal'#7#14 - +'crsScaleChilds'#26'ChildSizing.ShrinkVertical'#7#14'crsScaleChilds'#18'Chil' - +'dSizing.Layout'#7#29'cclLeftToRightThenTopToBottom'#27'ChildSizing.Controls' - +'PerLine'#2#1#12'ClientHeight'#2':'#11'ClientWidth'#3#146#0#13'Items.Strings' - +#1#6#3'All'#6#7'Forward'#6#8'Backward'#0#8'TabOrder'#2#6#7'Visible'#8#0#0#9 - +'TCheckBox'#9'CheckBox2'#22'AnchorSideLeft.Control'#7#6'Label1'#21'AnchorSid' - +'eTop.Control'#7#9'CheckBox1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2 - +#6#6'Height'#2#13#3'Top'#2'X'#5'Width'#2'E'#17'BorderSpacing.Top'#2#8#7'Capt' - +'ion'#6#11'Partial key'#8'TabOrder'#2#3#0#0#0 + 'TPF0'#17'TrxDBGridFindForm'#16'rxDBGridFindForm'#4'Left'#3#218#1#6'Height'#3 + +#232#0#3'Top'#3#128#1#5'Width'#3#237#1#13'ActiveControl'#7#5'Edit1'#7'Captio' + +'n'#6#4'Find'#12'ClientHeight'#3#232#0#11'ClientWidth'#3#237#1#8'OnCreate'#7 + +#10'FormCreate'#6'OnShow'#7#8'FormShow'#8'Position'#7#15'poDesktopCenter'#10 + +'LCLVersion'#6#6'0.9.27'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5 + +'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#24'AnchorSideBottom.Control'#7#5 + +'Edit1'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#18#3 + +'Top'#2#6#5'Width'#2'N'#20'BorderSpacing.Around'#2#6#7'Caption'#6#12'Text to' + +' find'#12'FocusControl'#7#5'Edit1'#11'ParentColor'#8#0#0#6'TLabel'#6'Label2' + +#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#5'Edit1' + +#18'AnchorSideTop.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#9'Comb' + +'oBox1'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#18#3 + +'Top'#2'?'#5'Width'#2'P'#20'BorderSpacing.Around'#2#6#7'Caption'#6#13'Find a' + +'t filed'#11'ParentColor'#8#0#0#7'TButton'#7'BtnFind'#23'AnchorSideRight.Con' + +'trol'#7#7'Button2'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBot' + +'tom.Side'#7#9'asrBottom'#4'Left'#3'N'#1#6'Height'#2'%'#3'Top'#3#189#0#5'Wid' + +'th'#2'X'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpac' + +'ing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#4#7'Caption'#6#9'Find more' + +#7'Default'#9#7'OnClick'#7#12'BtnFindClick'#8'TabOrder'#2#4#0#0#7'TButton'#7 + +'Button2'#21'AnchorSideTop.Control'#7#7'BtnFind'#18'AnchorSideTop.Side'#7#9 + +'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7 + +#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Si' + +'de'#7#9'asrBottom'#4'Left'#3#172#1#6'Height'#2'%'#3'Top'#3#189#0#5'Width'#2 + +';'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#17'BorderSpacing.To' + +'p'#2#8#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#4#6'Can' + +'cel'#9#7'Caption'#6#5'Close'#7'OnClick'#7#12'Button2Click'#8'TabOrder'#2#5#0 + +#0#5'TEdit'#5'Edit1'#22'AnchorSideLeft.Control'#7#9'ComboBox1'#21'AnchorSide' + +'Top.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSid' + +'eRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2 + +#18#6'Height'#2#27#3'Top'#2#30#5'Width'#3#213#1#7'Anchors'#11#5'akTop'#6'akL' + +'eft'#7'akRight'#0#20'BorderSpacing.Around'#2#6#8'TabOrder'#2#0#0#0#9'TCombo' + +'Box'#9'ComboBox1'#22'AnchorSideLeft.Control'#7#6'Label2'#21'AnchorSideTop.C' + +'ontrol'#7#6'Label2'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRigh' + +'t.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#12#6 + +'Height'#2#31#3'Top'#2'W'#5'Width'#3#219#1#7'Anchors'#11#5'akTop'#6'akLeft'#7 + +'akRight'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#5'Style'#7#14'cs' + +'DropDownList'#8'TabOrder'#2#1#0#0#9'TCheckBox'#9'CheckBox1'#22'AnchorSideLe' + +'ft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'ComboBox1'#18'AnchorSi' + +'deTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#21#3'Top'#2'|'#5'Width'#3 + +#129#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#14'Case sensetive'#8'TabOrd' + +'er'#2#2#0#0#11'TRadioGroup'#11'RadioGroup1'#22'AnchorSideLeft.Control'#7#9 + +'CheckBox1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control' + +#7#9'ComboBox1'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Con' + +'trol'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#141#0#6 + +'Height'#2'4'#3'Top'#2'|'#5'Width'#3'Z'#1#7'Anchors'#11#5'akTop'#6'akLeft'#7 + +'akRight'#0#8'AutoFill'#9#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#7'Capti' + +'on'#6#9'Direction'#28'ChildSizing.LeftRightSpacing'#2#6#28'ChildSizing.TopB' + +'ottomSpacing'#2#6#29'ChildSizing.EnlargeHorizontal'#7#24'crsHomogenousChild' + +'Resize'#27'ChildSizing.EnlargeVertical'#7#24'crsHomogenousChildResize'#28'C' + +'hildSizing.ShrinkHorizontal'#7#14'crsScaleChilds'#26'ChildSizing.ShrinkVert' + +'ical'#7#14'crsScaleChilds'#18'ChildSizing.Layout'#7#29'cclLeftToRightThenTo' + +'pToBottom'#27'ChildSizing.ControlsPerLine'#2#3#12'ClientHeight'#2'!'#11'Cli' + +'entWidth'#3'V'#1#7'Columns'#2#3#13'Items.Strings'#1#6#3'All'#6#7'Forward'#6 + +#8'Backward'#0#8'TabOrder'#2#6#7'Visible'#8#0#0#9'TCheckBox'#9'CheckBox2'#22 + +'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#9'CheckBox1' + +#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#21#3'Top'#3 + +#151#0#5'Width'#2'['#20'BorderSpacing.Around'#2#6#7'Caption'#6#11'Partial ke' + +'y'#8'TabOrder'#2#3#0#0#0 ]); diff --git a/components/rx/rxdbgrid_findunit.pas b/components/rx/rxdbgrid_findunit.pas index 4873a593e..2855c90b3 100644 --- a/components/rx/rxdbgrid_findunit.pas +++ b/components/rx/rxdbgrid_findunit.pas @@ -24,7 +24,7 @@ type RadioGroup1: TRadioGroup; procedure BtnFindClick(Sender: TObject); procedure Button2Click(Sender: TObject); - procedure FormActivate(Sender: TObject); + procedure FormCreate(Sender: TObject); procedure FormShow(Sender: TObject); private FGrid:TRxDBGrid; @@ -37,7 +37,7 @@ type procedure ShowRxDBGridFindForm(Grid:TRxDBGrid); implementation -uses dbutils, DBGrids; +uses dbutils, DBGrids, rxdconst; procedure ShowRxDBGridFindForm(Grid: TRxDBGrid); var @@ -56,11 +56,18 @@ begin Close; end; -procedure TrxDBGridFindForm.FormActivate(Sender: TObject); +procedure TrxDBGridFindForm.FormCreate(Sender: TObject); begin -{ BtnFind.Height:=Canvas.TextHeight('W') + 6; - Button2.Height:=BtnFind.Height;} - ComboBox1.Height:=Edit1.Height; + Caption:=sRxDbGridFindCaption; + Label1.Caption:=sRxDbGridFindText; + Label2.Caption:=sRxDbGridFindOnField; + CheckBox1.Caption:=sRxDbGridFindCaseSens; + CheckBox2.Caption:=sRxDbGridFindPartial; + RadioGroup1.Caption:=sRxDbGridFindDirecion; + RadioGroup1.Items.Clear; + RadioGroup1.Items.Add(sRxDbGridFindRangeAll); + RadioGroup1.Items.Add(sRxDbGridFindRangeForw); + RadioGroup1.Items.Add(sRxDbGridFindRangeBack); end; procedure TrxDBGridFindForm.FormShow(Sender: TObject); diff --git a/components/rx/rxdconst.pas b/components/rx/rxdconst.pas index 7018cc56c..ddd13dd86 100644 --- a/components/rx/rxdconst.pas +++ b/components/rx/rxdconst.pas @@ -9,160 +9,125 @@ unit rxdconst; -{ RX Data aware controls constants } -{ - Reserved range - from MaxExtStrID - 86 - to MaxExtStrID - 134 -} - interface -const -{ The minimal VCL's used string ID is 61440. The custom IDs must be - less that above. } - MaxExtStrID = 61300; resourcestring -(* -{ DBLists } - - SLocalDatabase = MaxExtStrID - 86; - -{ DBUtils } - - SRetryLogin = MaxExtStrID - 87; - -{ DBFilter } - - SExprNotBoolean = MaxExtStrID - 88; - SExprBadNullTest = MaxExtStrID - 89; - SExprBadField = MaxExtStrID - 90; - SCaptureFilter = MaxExtStrID - 91; - SNotCaptureFilter = MaxExtStrID - 92; { RxDBCtrl } - SInactiveData = MaxExtStrID - 93; - SBrowseData = MaxExtStrID - 94; - SEditData = MaxExtStrID - 95; - SInsertData = MaxExtStrID - 96; - SSetKeyData = MaxExtStrID - 97; - SCalcFieldsData = MaxExtStrID - 98; + SLocalDatabase = 'Невозможно произвести эту операцию с локальной базой данных'; + SRetryLogin = 'Вы хотите повторить попытку соединения с базой данных?'; + SExprNotBoolean = 'Field ''%s'' is not boolean'; + SExprBadNullTest = 'NULL-values enabled in ''='' и ''<>'''; + SExprBadField = 'Field ''%s'' not used in filter expression'; + SCaptureFilter = 'Элементы управления захвачены фильтром'; + SNotCaptureFilter = 'Элементы управления должны быть захвачены фильтром'; + SInactiveData = 'inactive'; + SBrowseData = 'browse'; + SEditData = 'editing'; + SInsertData = 'append'; + SSetKeyData = 'find'; + SCalcFieldsData = 'calc'; + SRegistration = 'Register'; + SAppTitleLabel = 'Application "%s"'; + SHintLabel = 'Enter you user name and password'; + SUserNameLabel = '&User name:'; + SPasswordLabel = '&Password:'; + SMore1 = '&More >>'; + SMore2 = '&Less <<'; + SInvalidUserName = 'User name or password not valid'; + SChangePassword = 'Change password'; + SOldPasswordLabel = '&Old password:'; + SNewPasswordLabel = '&New password:'; + SConfirmPasswordLabel = '&Confirm:'; + SPasswordChanged = 'Password changed'; + SPasswordNotChanged = 'Password not changed'; + SPasswordsMismatch = 'New password and confirmation not equal'; + SDBExceptCaption = 'Error in DB engine'; + SServerErrorLabel = 'Server error'; + SErrorMsgLabel = 'Error message'; + SNextButton = '&Next'; + SPrevButton = '&Prior'; + SExprIncorrect = 'Error in filter expression'; + SExprTermination = 'Error in filter end'; + SExprNameError = 'Error in filed name'; + SExprStringError = 'Error in string const'; + SExprInvalidChar = 'Error symbol in expression: ''%s'''; + SExprNoRParen = 'Ожидалось '')'', а встречено: %s'; + SExprExpected = 'Ожидалось выражение, а встречено %s'; + SExprBadCompare = 'Операции сравнения требуют наличия поля и константы'; + SConfirmSave = 'Data changed. Save?'; + SDatabaseName = 'Database loocked: %s'; + SUnlockCaption = 'Unloock'; + SUnlockHint = 'Enter you password'; + SDeleteMultipleRecords = 'Delete all selected records?'; -{ LoginDlg } - - SRegistration = MaxExtStrID - 99; - SAppTitleLabel = MaxExtStrID - 100; - SHintLabel = MaxExtStrID - 101; - SUserNameLabel = MaxExtStrID - 102; - SPasswordLabel = MaxExtStrID - 103; - SInvalidUserName = MaxExtStrID - 104; - -{ ChPswDlg } - - SChangePassword = MaxExtStrID - 105; - SOldPasswordLabel = MaxExtStrID - 106; - SNewPasswordLabel = MaxExtStrID - 107; - SConfirmPasswordLabel = MaxExtStrID - 108; - SPasswordChanged = MaxExtStrID - 109; - SPasswordNotChanged = MaxExtStrID - 110; - SPasswordsMismatch = MaxExtStrID - 111; - -{ DBExcpt } - - SDBExceptCaption = MaxExtStrID - 112; - SBDEErrorLabel = MaxExtStrID - 113; - SServerErrorLabel = MaxExtStrID - 114; - SErrorMsgLabel = MaxExtStrID - 115; - SNextButton = MaxExtStrID - 116; - SPrevButton = MaxExtStrID - 117; - -{ DBFilter expression parser } - - SExprIncorrect = MaxExtStrID - 118; - SExprTermination = MaxExtStrID - 119; - SExprNameError = MaxExtStrID - 120; - SExprStringError = MaxExtStrID - 121; - SExprInvalidChar = MaxExtStrID - 122; - SExprNoRParen = MaxExtStrID - 123; - SExprExpected = MaxExtStrID - 124; - SExprBadCompare = MaxExtStrID - 125; - -{ DBUtils } - - SConfirmSave = MaxExtStrID - 126; - SDatabaseName = MaxExtStrID - 127; - -{ LoginDlg } - - SUnlockCaption = MaxExtStrID - 128; - SUnlockHint = MaxExtStrID - 129; - -{ RxDBCtrl } - - SDeleteMultipleRecords = MaxExtStrID - 130;*) - - SLocalDatabase = 'Невозможно произвести эту операцию с локальной базой данных'; - SRetryLogin = 'Вы хотите повторить попытку соединения с базой данных?'; - SExprNotBoolean = 'Поле ''%s'' не является полем логического типа'; - SExprBadNullTest = 'NULL-значения допустимы только в операциях ''='' и ''<>'''; - SExprBadField = 'Поле ''%s'' не может быть использовано в выражении фильтра'; - SCaptureFilter = 'Элементы управления захвачены фильтром'; - SNotCaptureFilter = 'Элементы управления должны быть захвачены фильтром'; - SInactiveData = 'неактивно'; - SBrowseData = 'просмотр'; - SEditData = 'редактирование'; - SInsertData = 'добавление'; - SSetKeyData = 'поиск'; - SCalcFieldsData = 'подсчет'; - SRegistration = 'Регистрация'; - SAppTitleLabel = 'Программа "%s"'; - SHintLabel = 'Введите Ваше пользовательское имя и пароль'; - SUserNameLabel = '&Имя пользователя:'; - SPasswordLabel = '&Пароль:'; - SMore1 = '&Больше >>'; - SMore2 = '&Меньше <<'; - SInvalidUserName = 'Неверное имя пользователя или пароль'; - SChangePassword = 'Смена пароля'; - SOldPasswordLabel = '&Старый пароль:'; - SNewPasswordLabel = '&Новый пароль:'; - SConfirmPasswordLabel = '&Подтверждение:'; - SPasswordChanged = 'Пароль сменен'; - SPasswordNotChanged = 'Пароль не сменен'; - SPasswordsMismatch = 'Новый пароль и подтверждение не совпадают'; - SDBExceptCaption = 'Ошибка процессора БД'; - SBDEErrorLabel = 'Ошибка BDE'; - SServerErrorLabel = 'Ошибка сервера'; - SErrorMsgLabel = 'Сообщение об ошибке'; - SNextButton = '&Дальше'; - SPrevButton = '&Назад'; - SExprIncorrect = 'Некорректно сформулировано выражение фильтра'; - SExprTermination = 'Неверное завершение выражения фильтра'; - SExprNameError = 'Невозможно определить завершение имени поля'; - SExprStringError = 'Невозможно определить завершение строковой константы'; - SExprInvalidChar = 'Неверный символ в выражении фильтра: ''%s'''; - SExprNoRParen = 'Ожидалось '')'', а встречено: %s'; - SExprExpected = 'Ожидалось выражение, а встречено %s'; - SExprBadCompare = 'Операции сравнения требуют наличия поля и константы'; - SConfirmSave = 'Данные были изменены. Сохранять?'; - SDatabaseName = 'База данных: %s'; - SUnlockCaption = 'Разблокирование'; - SUnlockHint = 'Введите ваш пароль'; - SDeleteMultipleRecords = 'Удалить все выбранные записи?'; - - SPropDefByLookup = 'PropDefByLookup'; - SDataSourceFixed = 'SDataSourceFixed'; - SCircularDataLink = 'SCircularDataLink'; + SPropDefByLookup = 'PropDefByLookup'; + SDataSourceFixed = 'SDataSourceFixed'; + SCircularDataLink = 'SCircularDataLink'; + sRxAscendign = 'Ascendente';//'Ascendente'); + sRxDescending = 'Descendente';//'Descendente'); - SDeleteRecordQuestion = 'Delete record?'; - SFieldTypeMismatch = 'Type mismatch for field ''%s'', expecting: %s actual: %s'; - SInvalidDate = 'Invalid Date'; - SFieldRequired = 'Field ''%s'' must have a value'; - SNotEditing = 'Dataset not in edit or insert mode'; - SUnknownFieldType = 'SUnknownFieldType %s'; - SFieldReadOnly = 'SFieldReadOnly %s'; + SDeleteRecordQuestion = 'Delete record?'; + SFieldTypeMismatch = 'Type mismatch for field ''%s'', expecting: %s actual: %s'; + SInvalidDate = 'Invalid Date'; + SFieldRequired = 'Field ''%s'' must have a value'; + SNotEditing = 'Dataset not in edit or insert mode'; + SUnknownFieldType = 'SUnknownFieldType %s'; + SFieldReadOnly = 'SFieldReadOnly %s'; + + //RXDBgrid + sRxDBGridFind = 'Find data'; //// 'Buscar Ctrl+F'; + sRxDBGridFilter = 'Filter data';//'Filtrar Ctrl+T'; + sRxDBGridFilterSimple = 'Filter in table';// Ctrl+E'; 'Filtrar en Encabezado Ctrl+E'; + sRxDBGridFilterClear = 'Clear filter';// Ctrl+Q';'Quitar Filtro Ctrl+Q'; + sRxDBGridSortByColumns = 'Sort data for collumns';// Ctrl+C';'Ordenar por Columnas Ctrl+C'; + sRxDBGridSelectColumns = 'Select visible collumns';// Ctrl+W';'Seleccionar Columnas Ctrl+W'; + sRxDBGridEmptiFilter = '(Empty)'; + + //RxDBGrid filter form + sRxFilterFormSelectExp = 'Enter filter expression for data in table:'; + sRxFilterFormOnField = 'On field :'; + sRxFilterFormOperaion = 'Operation :'; + sRxFilterFormCondition = 'Condition :'; + sRxFilterFormOperand = 'Operand :'; + sRxFilterFormEnd = 'end.'; + sRxFilterFormClear = 'Clear filter'; + sRxFilterFormCancel = 'Cancel'; + sRxFilterFormApply = 'Apply'; + sRxFilterFormCaption = 'Filter conditions'; + + //TrxSortByForm + sRxSortByFormCaption = 'Sort on field'; + sRxSortByFormAllFields = '&Fields in dataset:'; + sRxSortByFormSortFields = '&Selected fields:'; + sRxSortByFormSortOrder = 'Select field for sort data:'; + sRxSortByFormAddField = '&Add field'; + sRxSortByFormRemoveField = '&Remove'; + sRxSortByFormMoveUpField = '&Up'; + sRxSortByFormMoveDnField = '&Down'; + + //TRxMemoryData + SMemNoRecords = 'No data found'; + SInvalidFields = 'No fields defined'; + + //TrxDBGridFindForm + sRxDbGridFindCaption = 'Find data'; + sRxDbGridFindText = 'Text to find'; + sRxDbGridFindOnField = 'Find on field'; + sRxDbGridFindCaseSens = 'Case sensetive'; + sRxDbGridFindPartial = 'Partial key'; + sRxDbGridFindDirecion = 'Direction'; + sRxDbGridFindRangeAll = 'All'; + sRxDbGridFindRangeForw = 'Forward'; + sRxDbGridFindRangeBack = 'Backward'; + + //TrxDBGridColumsForm + sRxDbGridSelColCaption = 'Grid columns'; + sRxDbGridSelColHint1 = 'Move selected column up'; + sRxDbGridSelColHint2 = 'Move selected column down'; const { The following strings should not be localized } diff --git a/components/rx/rxfilterby.lfm b/components/rx/rxfilterby.lfm new file mode 100644 index 000000000..e9acac6bd --- /dev/null +++ b/components/rx/rxfilterby.lfm @@ -0,0 +1,775 @@ +object rxFilterByForm: TrxFilterByForm + Left = 464 + Height = 445 + Top = 115 + Width = 644 + ActiveControl = Edit1 + Caption = 'Filter conditions' + ClientHeight = 445 + ClientWidth = 644 + OnCreate = FormCreate + Position = poScreenCenter + LCLVersion = '0.9.27' + object Label1: TLabel + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner + Left = 6 + Height = 18 + Top = 6 + Width = 252 + BorderSpacing.Around = 6 + Caption = 'Select filter expression for data' + Font.Style = [fsBold] + ParentColor = False + ParentFont = False + end + object Label2: TLabel + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 18 + Top = 30 + Width = 68 + BorderSpacing.Around = 6 + Caption = 'On field:' + Font.Color = clRed + Font.Style = [fsBold] + ParentColor = False + ParentFont = False + end + object Label3: TLabel + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + Left = 168 + Height = 18 + Top = 30 + Width = 90 + BorderSpacing.Around = 6 + Caption = 'Operation :' + Font.Color = clRed + Font.Style = [fsBold] + ParentColor = False + ParentFont = False + end + object Label4: TLabel + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + Left = 271 + Height = 18 + Top = 30 + Width = 96 + BorderSpacing.Around = 6 + Caption = 'Conditions :' + Font.Color = clRed + Font.Style = [fsBold] + ParentColor = False + ParentFont = False + end + object Label5: TLabel + AnchorSideLeft.Control = ComboBox3 + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + Left = 533 + Height = 18 + Top = 30 + Width = 80 + BorderSpacing.Around = 6 + Caption = 'Operand :' + Font.Color = clRed + Font.Style = [fsBold] + ParentColor = False + ParentFont = False + end + object Label6: TLabel + AnchorSideLeft.Control = ComboBox3 + AnchorSideTop.Side = asrBottom + AnchorSideBottom.Control = ComboBox25 + AnchorSideBottom.Side = asrBottom + Left = 527 + Height = 18 + Top = 379 + Width = 35 + Anchors = [akLeft, akBottom] + Caption = 'End.' + Font.Color = clRed + Font.Style = [fsBold] + ParentColor = False + ParentFont = False + end + object ComboBox1: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Label2 + AnchorSideTop.Side = asrBottom + Left = 6 + Height = 31 + Top = 54 + Width = 153 + BorderSpacing.Around = 6 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 0 + end + object ComboBox2: TComboBox + AnchorSideTop.Control = Label2 + AnchorSideTop.Side = asrBottom + Left = 168 + Height = 31 + Top = 54 + Width = 96 + BorderSpacing.Around = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 1 + end + object Edit1: TEdit + AnchorSideTop.Control = Label2 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 271 + Height = 27 + Top = 54 + Width = 250 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Around = 6 + OnChange = EditChange + TabOrder = 2 + end + object ComboBox3: TComboBox + AnchorSideTop.Control = Label2 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 527 + Height = 31 + Top = 54 + Width = 111 + Anchors = [akTop, akRight] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 3 + end + object ComboBox4: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ComboBox1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 31 + Top = 93 + Width = 149 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Around = 2 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 4 + end + object ComboBox5: TComboBox + AnchorSideLeft.Control = ComboBox2 + AnchorSideTop.Control = ComboBox1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox2 + AnchorSideRight.Side = asrBottom + Left = 168 + Height = 31 + Top = 91 + Width = 96 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 5 + end + object Edit2: TEdit + AnchorSideLeft.Control = ComboBox2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 270 + Height = 27 + Top = 91 + Width = 251 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + OnChange = EditChange + TabOrder = 6 + end + object ComboBox6: TComboBox + AnchorSideTop.Control = ComboBox1 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 527 + Height = 31 + Top = 91 + Width = 111 + Anchors = [akTop, akRight] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 7 + end + object ComboBox7: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ComboBox4 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 31 + Top = 132 + Width = 149 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Around = 2 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 8 + end + object ComboBox8: TComboBox + AnchorSideLeft.Control = ComboBox2 + AnchorSideTop.Control = ComboBox4 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox2 + AnchorSideRight.Side = asrBottom + Left = 168 + Height = 31 + Top = 130 + Width = 96 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 9 + end + object Edit3: TEdit + AnchorSideLeft.Control = ComboBox2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox4 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 270 + Height = 27 + Top = 130 + Width = 251 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + OnChange = EditChange + TabOrder = 10 + end + object ComboBox9: TComboBox + AnchorSideTop.Control = ComboBox4 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 527 + Height = 31 + Top = 130 + Width = 111 + Anchors = [akTop, akRight] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 11 + end + object ComboBox10: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ComboBox7 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 31 + Top = 171 + Width = 149 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Around = 2 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 12 + end + object ComboBox11: TComboBox + AnchorSideLeft.Control = ComboBox2 + AnchorSideTop.Control = ComboBox7 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox2 + AnchorSideRight.Side = asrBottom + Left = 168 + Height = 31 + Top = 169 + Width = 96 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 13 + end + object Edit4: TEdit + AnchorSideLeft.Control = ComboBox2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox7 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 270 + Height = 27 + Top = 169 + Width = 251 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + OnChange = EditChange + TabOrder = 14 + end + object ComboBox12: TComboBox + AnchorSideTop.Control = ComboBox7 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 527 + Height = 31 + Top = 169 + Width = 111 + Anchors = [akTop, akRight] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 15 + end + object ComboBox13: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ComboBox10 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 31 + Top = 210 + Width = 149 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Around = 2 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 16 + end + object ComboBox14: TComboBox + AnchorSideLeft.Control = ComboBox2 + AnchorSideTop.Control = ComboBox10 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox2 + AnchorSideRight.Side = asrBottom + Left = 168 + Height = 31 + Top = 208 + Width = 96 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 17 + end + object Edit5: TEdit + AnchorSideLeft.Control = ComboBox2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox10 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 270 + Height = 27 + Top = 208 + Width = 251 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + OnChange = EditChange + TabOrder = 18 + end + object ComboBox15: TComboBox + AnchorSideTop.Control = ComboBox10 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 527 + Height = 31 + Top = 208 + Width = 111 + Anchors = [akTop, akRight] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 19 + end + object ComboBox16: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ComboBox13 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 31 + Top = 249 + Width = 149 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Around = 2 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 20 + end + object ComboBox17: TComboBox + AnchorSideLeft.Control = ComboBox2 + AnchorSideTop.Control = ComboBox13 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox2 + AnchorSideRight.Side = asrBottom + Left = 168 + Height = 31 + Top = 247 + Width = 96 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 21 + end + object Edit6: TEdit + AnchorSideLeft.Control = ComboBox2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox13 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 270 + Height = 27 + Top = 247 + Width = 251 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + OnChange = EditChange + TabOrder = 22 + end + object ComboBox18: TComboBox + AnchorSideTop.Control = ComboBox13 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 527 + Height = 31 + Top = 247 + Width = 111 + Anchors = [akTop, akRight] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 23 + end + object ComboBox19: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ComboBox16 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 31 + Top = 288 + Width = 149 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Around = 2 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 24 + end + object ComboBox20: TComboBox + AnchorSideLeft.Control = ComboBox2 + AnchorSideTop.Control = ComboBox16 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox2 + AnchorSideRight.Side = asrBottom + Left = 168 + Height = 31 + Top = 286 + Width = 96 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 25 + end + object Edit7: TEdit + AnchorSideLeft.Control = ComboBox2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox16 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 270 + Height = 27 + Top = 286 + Width = 251 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + OnChange = EditChange + TabOrder = 26 + end + object ComboBox21: TComboBox + AnchorSideTop.Control = ComboBox16 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 527 + Height = 31 + Top = 286 + Width = 111 + Anchors = [akTop, akRight] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 27 + end + object ComboBox22: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ComboBox19 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 31 + Top = 327 + Width = 149 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Around = 2 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 28 + end + object ComboBox23: TComboBox + AnchorSideLeft.Control = ComboBox2 + AnchorSideTop.Control = ComboBox19 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox2 + AnchorSideRight.Side = asrBottom + Left = 168 + Height = 31 + Top = 325 + Width = 96 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 29 + end + object Edit8: TEdit + AnchorSideLeft.Control = ComboBox2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox19 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 270 + Height = 27 + Top = 325 + Width = 251 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + OnChange = EditChange + TabOrder = 30 + end + object ComboBox24: TComboBox + AnchorSideTop.Control = ComboBox19 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + Left = 527 + Height = 31 + Top = 325 + Width = 111 + Anchors = [akTop, akRight] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 31 + end + object ComboBox25: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = ComboBox22 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox1 + AnchorSideRight.Side = asrBottom + Left = 8 + Height = 31 + Top = 366 + Width = 149 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + BorderSpacing.Around = 2 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 32 + end + object ComboBox26: TComboBox + AnchorSideLeft.Control = ComboBox2 + AnchorSideTop.Control = ComboBox22 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox2 + AnchorSideRight.Side = asrBottom + Left = 168 + Height = 31 + Top = 364 + Width = 96 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Top = 6 + DropDownCount = 9 + ItemHeight = 0 + OnChange = ComboBoxChange + Style = csDropDownList + TabOrder = 33 + end + object Edit9: TEdit + AnchorSideLeft.Control = ComboBox2 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ComboBox22 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = ComboBox3 + Left = 270 + Height = 27 + Top = 364 + Width = 251 + Anchors = [akTop, akLeft, akRight] + BorderSpacing.Left = 6 + BorderSpacing.Top = 6 + OnChange = EditChange + TabOrder = 34 + end + object ComboBox27: TComboBox + AnchorSideLeft.Control = Owner + AnchorSideBottom.Control = Owner + AnchorSideBottom.Side = asrBottom + Left = 6 + Height = 31 + Top = 408 + Width = 58 + Anchors = [akLeft, akBottom] + BorderSpacing.Around = 6 + ItemHeight = 0 + Items.Strings = ( + 'And' + 'Or' + ) + Style = csDropDownList + TabOrder = 35 + Visible = False + end + object Button1: TButton + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = Owner + AnchorSideBottom.Side = asrBottom + Left = 589 + Height = 29 + Top = 410 + Width = 49 + Anchors = [akRight, akBottom] + AutoSize = True + BorderSpacing.Around = 6 + Caption = 'Apply' + Default = True + OnClick = Button1Click + TabOrder = 36 + end + object Button2: TButton + AnchorSideRight.Control = Button1 + AnchorSideBottom.Control = Owner + AnchorSideBottom.Side = asrBottom + Left = 524 + Height = 29 + Top = 410 + Width = 59 + Anchors = [akRight, akBottom] + AutoSize = True + BorderSpacing.Around = 6 + Cancel = True + Caption = 'Cancel' + OnClick = Button2Click + TabOrder = 37 + end + object Button3: TButton + AnchorSideRight.Control = Button2 + AnchorSideBottom.Control = Owner + AnchorSideBottom.Side = asrBottom + Left = 436 + Height = 29 + Top = 410 + Width = 82 + Anchors = [akRight, akBottom] + AutoSize = True + BorderSpacing.Around = 6 + Caption = 'Clear filter' + OnClick = Button3Click + TabOrder = 38 + end +end diff --git a/components/rx/rxfilterby.lrs b/components/rx/rxfilterby.lrs new file mode 100644 index 000000000..d2ac72a9b --- /dev/null +++ b/components/rx/rxfilterby.lrs @@ -0,0 +1,261 @@ +{ Это - файл ресурсов, автоматически созданный lazarus } + +LazarusResources.Add('TrxFilterByForm','FORMDATA',[ + 'TPF0'#15'TrxFilterByForm'#14'rxFilterByForm'#4'Left'#3#208#1#6'Height'#3#189 + +#1#3'Top'#2's'#5'Width'#3#132#2#13'ActiveControl'#7#5'Edit1'#7'Caption'#6#17 + +'Filter conditions'#12'ClientHeight'#3#189#1#11'ClientWidth'#3#132#2#8'OnCre' + +'ate'#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'#10'LCLVersion'#6#6'0' + +'.9.27'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Ancho' + +'rSideTop.Control'#7#5'Owner'#4'Left'#2#6#6'Height'#2#18#3'Top'#2#6#5'Width' + +#3#252#0#20'BorderSpacing.Around'#2#6#7'Caption'#6'!Select filter expression' + +' for data'#10'Font.Style'#11#6'fsBold'#0#11'ParentColor'#8#10'ParentFont'#8 + +#0#0#6'TLabel'#6'Label2'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSide' + +'Top.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#2#6#6 + +'Height'#2#18#3'Top'#2#30#5'Width'#2'D'#20'BorderSpacing.Around'#2#6#7'Capti' + +'on'#6#9'On field:'#10'Font.Color'#7#5'clRed'#10'Font.Style'#11#6'fsBold'#0 + +#11'ParentColor'#8#10'ParentFont'#8#0#0#6'TLabel'#6'Label3'#21'AnchorSideTop' + +'.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#168#0 + +#6'Height'#2#18#3'Top'#2#30#5'Width'#2'Z'#20'BorderSpacing.Around'#2#6#7'Cap' + +'tion'#6#11'Operation :'#10'Font.Color'#7#5'clRed'#10'Font.Style'#11#6'fsBol' + +'d'#0#11'ParentColor'#8#10'ParentFont'#8#0#0#6'TLabel'#6'Label4'#21'AnchorSi' + +'deTop.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3 + +#15#1#6'Height'#2#18#3'Top'#2#30#5'Width'#2'`'#20'BorderSpacing.Around'#2#6#7 + +'Caption'#6#12'Conditions :'#10'Font.Color'#7#5'clRed'#10'Font.Style'#11#6'f' + +'sBold'#0#11'ParentColor'#8#10'ParentFont'#8#0#0#6'TLabel'#6'Label5'#22'Anch' + +'orSideLeft.Control'#7#9'ComboBox3'#21'AnchorSideTop.Control'#7#6'Label1'#18 + +'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#21#2#6'Height'#2#18#3'Top'#2#30 + +#5'Width'#2'P'#20'BorderSpacing.Around'#2#6#7'Caption'#6#9'Operand :'#10'Fon' + +'t.Color'#7#5'clRed'#10'Font.Style'#11#6'fsBold'#0#11'ParentColor'#8#10'Pare' + +'ntFont'#8#0#0#6'TLabel'#6'Label6'#22'AnchorSideLeft.Control'#7#9'ComboBox3' + +#18'AnchorSideTop.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#10'Com' + +'boBox25'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#3#15#2#6'Height'#2 + +#18#3'Top'#3'{'#1#5'Width'#2'#'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#7'Capt' + +'ion'#6#4'End.'#10'Font.Color'#7#5'clRed'#10'Font.Style'#11#6'fsBold'#0#11'P' + +'arentColor'#8#10'ParentFont'#8#0#0#9'TComboBox'#9'ComboBox1'#22'AnchorSideL' + +'eft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#6'Label2'#18'AnchorSide' + +'Top.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height'#2#31#3'Top'#2'6'#5'Width'#3 + +#153#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#5'Style'#7#14'csDropD' + +'ownList'#8'TabOrder'#2#0#0#0#9'TComboBox'#9'ComboBox2'#21'AnchorSideTop.Con' + +'trol'#7#6'Label2'#18'AnchorSideTop.Side'#7#9'asrBottom'#4'Left'#3#168#0#6'H' + +'eight'#2#31#3'Top'#2'6'#5'Width'#2'`'#20'BorderSpacing.Around'#2#6#13'DropD' + +'ownCount'#2#9#10'ItemHeight'#2#0#8'OnChange'#7#14'ComboBoxChange'#5'Style'#7 + +#14'csDropDownList'#8'TabOrder'#2#1#0#0#5'TEdit'#5'Edit1'#21'AnchorSideTop.C' + +'ontrol'#7#6'Label2'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRigh' + +'t.Control'#7#9'ComboBox3'#4'Left'#3#15#1#6'Height'#2#27#3'Top'#2'6'#5'Width' + +#3#250#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#20'BorderSpacing.Arou' + +'nd'#2#6#8'OnChange'#7#10'EditChange'#8'TabOrder'#2#2#0#0#9'TComboBox'#9'Com' + +'boBox3'#21'AnchorSideTop.Control'#7#6'Label2'#18'AnchorSideTop.Side'#7#9'as' + +'rBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9 + +'asrBottom'#4'Left'#3#15#2#6'Height'#2#31#3'Top'#2'6'#5'Width'#2'o'#7'Anchor' + +'s'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0 + +#13'Items.Strings'#1#6#3'And'#6#2'Or'#0#5'Style'#7#14'csDropDownList'#8'TabO' + +'rder'#2#3#0#0#9'TComboBox'#9'ComboBox4'#22'AnchorSideLeft.Control'#7#5'Owne' + +'r'#21'AnchorSideTop.Control'#7#9'ComboBox1'#18'AnchorSideTop.Side'#7#9'asrB' + +'ottom'#23'AnchorSideRight.Control'#7#9'ComboBox1'#20'AnchorSideRight.Side'#7 + +#9'asrBottom'#4'Left'#2#8#6'Height'#2#31#3'Top'#2']'#5'Width'#3#149#0#7'Anch' + +'ors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'Borde' + +'rSpacing.Top'#2#6#20'BorderSpacing.Around'#2#2#10'ItemHeight'#2#0#5'Style'#7 + +#14'csDropDownList'#8'TabOrder'#2#4#0#0#9'TComboBox'#9'ComboBox5'#22'AnchorS' + +'ideLeft.Control'#7#9'ComboBox2'#21'AnchorSideTop.Control'#7#9'ComboBox1'#18 + +'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox' + +'2'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#168#0#6'Height'#2#31#3 + +'Top'#2'['#5'Width'#2'`'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'Bo' + +'rderSpacing.Top'#2#6#13'DropDownCount'#2#9#10'ItemHeight'#2#0#8'OnChange'#7 + +#14'ComboBoxChange'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#5#0#0#5'TEdi' + +'t'#5'Edit2'#22'AnchorSideLeft.Control'#7#9'ComboBox2'#19'AnchorSideLeft.Sid' + +'e'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'ComboBox1'#18'AnchorSideTop' + +'.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox3'#4'Left'#3 + ,#14#1#6'Height'#2#27#3'Top'#2'['#5'Width'#3#251#0#7'Anchors'#11#5'akTop'#6'a' + +'kLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#8 + +'OnChange'#7#10'EditChange'#8'TabOrder'#2#6#0#0#9'TComboBox'#9'ComboBox6'#21 + +'AnchorSideTop.Control'#7#9'ComboBox1'#18'AnchorSideTop.Side'#7#9'asrBottom' + +#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBott' + +'om'#4'Left'#3#15#2#6'Height'#2#31#3'Top'#2'['#5'Width'#2'o'#7'Anchors'#11#5 + +'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#13'Item' + +'s.Strings'#1#6#3'And'#6#2'Or'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2 + +#7#0#0#9'TComboBox'#9'ComboBox7'#22'AnchorSideLeft.Control'#7#5'Owner'#21'An' + +'chorSideTop.Control'#7#9'ComboBox4'#18'AnchorSideTop.Side'#7#9'asrBottom'#23 + +'AnchorSideRight.Control'#7#9'ComboBox1'#20'AnchorSideRight.Side'#7#9'asrBot' + +'tom'#4'Left'#2#8#6'Height'#2#31#3'Top'#3#132#0#5'Width'#3#149#0#7'Anchors' + +#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpac' + +'ing.Top'#2#6#20'BorderSpacing.Around'#2#2#10'ItemHeight'#2#0#5'Style'#7#14 + +'csDropDownList'#8'TabOrder'#2#8#0#0#9'TComboBox'#9'ComboBox8'#22'AnchorSide' + +'Left.Control'#7#9'ComboBox2'#21'AnchorSideTop.Control'#7#9'ComboBox4'#18'An' + +'chorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox2' + +#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#168#0#6'Height'#2#31#3'To' + +'p'#3#130#0#5'Width'#2'`'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'B' + +'orderSpacing.Top'#2#6#13'DropDownCount'#2#9#10'ItemHeight'#2#0#8'OnChange'#7 + +#14'ComboBoxChange'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#9#0#0#5'TEdi' + +'t'#5'Edit3'#22'AnchorSideLeft.Control'#7#9'ComboBox2'#19'AnchorSideLeft.Sid' + +'e'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'ComboBox4'#18'AnchorSideTop' + +'.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox3'#4'Left'#3 + +#14#1#6'Height'#2#27#3'Top'#3#130#0#5'Width'#3#251#0#7'Anchors'#11#5'akTop'#6 + +'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#8 + +'OnChange'#7#10'EditChange'#8'TabOrder'#2#10#0#0#9'TComboBox'#9'ComboBox9'#21 + +'AnchorSideTop.Control'#7#9'ComboBox4'#18'AnchorSideTop.Side'#7#9'asrBottom' + +#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBott' + +'om'#4'Left'#3#15#2#6'Height'#2#31#3'Top'#3#130#0#5'Width'#2'o'#7'Anchors'#11 + +#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#13'It' + +'ems.Strings'#1#6#3'And'#6#2'Or'#0#5'Style'#7#14'csDropDownList'#8'TabOrder' + +#2#11#0#0#9'TComboBox'#10'ComboBox10'#22'AnchorSideLeft.Control'#7#5'Owner' + +#21'AnchorSideTop.Control'#7#9'ComboBox7'#18'AnchorSideTop.Side'#7#9'asrBott' + +'om'#23'AnchorSideRight.Control'#7#9'ComboBox1'#20'AnchorSideRight.Side'#7#9 + +'asrBottom'#4'Left'#2#8#6'Height'#2#31#3'Top'#3#171#0#5'Width'#3#149#0#7'Anc' + +'hors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'Bord' + +'erSpacing.Top'#2#6#20'BorderSpacing.Around'#2#2#10'ItemHeight'#2#0#5'Style' + +#7#14'csDropDownList'#8'TabOrder'#2#12#0#0#9'TComboBox'#10'ComboBox11'#22'An' + +'chorSideLeft.Control'#7#9'ComboBox2'#21'AnchorSideTop.Control'#7#9'ComboBox' + +'7'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'Co' + +'mboBox2'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#168#0#6'Height'#2 + +#31#3'Top'#3#169#0#5'Width'#2'`'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight' + +#0#17'BorderSpacing.Top'#2#6#13'DropDownCount'#2#9#10'ItemHeight'#2#0#8'OnCh' + +'ange'#7#14'ComboBoxChange'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#13#0 + +#0#5'TEdit'#5'Edit4'#22'AnchorSideLeft.Control'#7#9'ComboBox2'#19'AnchorSide' + +'Left.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#9'ComboBox7'#18'Ancho' + +'rSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox3'#4 + +'Left'#3#14#1#6'Height'#2#27#3'Top'#3#169#0#5'Width'#3#251#0#7'Anchors'#11#5 + +'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.T' + +'op'#2#6#8'OnChange'#7#10'EditChange'#8'TabOrder'#2#14#0#0#9'TComboBox'#10'C' + +'omboBox12'#21'AnchorSideTop.Control'#7#9'ComboBox7'#18'AnchorSideTop.Side'#7 + +#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side' + +#7#9'asrBottom'#4'Left'#3#15#2#6'Height'#2#31#3'Top'#3#169#0#5'Width'#2'o'#7 + +'Anchors'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6#10'ItemHeigh' + +'t'#2#0#13'Items.Strings'#1#6#3'And'#6#2'Or'#0#5'Style'#7#14'csDropDownList' + +#8'TabOrder'#2#15#0#0#9'TComboBox'#10'ComboBox13'#22'AnchorSideLeft.Control' + +#7#5'Owner'#21'AnchorSideTop.Control'#7#10'ComboBox10'#18'AnchorSideTop.Side' + +#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox1'#20'AnchorSideRigh' + +'t.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#31#3'Top'#3#210#0#5'Width'#3 + +#149#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2 + +#6#17'BorderSpacing.Top'#2#6#20'BorderSpacing.Around'#2#2#10'ItemHeight'#2#0 + +#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#16#0#0#9'TComboBox'#10'ComboBox' + +'14'#22'AnchorSideLeft.Control'#7#9'ComboBox2'#21'AnchorSideTop.Control'#7#10 + ,'ComboBox10'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Contro' + +'l'#7#9'ComboBox2'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#168#0#6 + +'Height'#2#31#3'Top'#3#208#0#5'Width'#2'`'#7'Anchors'#11#5'akTop'#6'akLeft'#7 + +'akRight'#0#17'BorderSpacing.Top'#2#6#13'DropDownCount'#2#9#10'ItemHeight'#2 + +#0#8'OnChange'#7#14'ComboBoxChange'#5'Style'#7#14'csDropDownList'#8'TabOrder' + +#2#17#0#0#5'TEdit'#5'Edit5'#22'AnchorSideLeft.Control'#7#9'ComboBox2'#19'Anc' + +'horSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#10'ComboBox10' + +#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'Combo' + +'Box3'#4'Left'#3#14#1#6'Height'#2#27#3'Top'#3#208#0#5'Width'#3#251#0#7'Ancho' + +'rs'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'Border' + +'Spacing.Top'#2#6#8'OnChange'#7#10'EditChange'#8'TabOrder'#2#18#0#0#9'TCombo' + +'Box'#10'ComboBox15'#21'AnchorSideTop.Control'#7#10'ComboBox10'#18'AnchorSid' + +'eTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorS' + +'ideRight.Side'#7#9'asrBottom'#4'Left'#3#15#2#6'Height'#2#31#3'Top'#3#208#0#5 + +'Width'#2'o'#7'Anchors'#11#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6 + +#10'ItemHeight'#2#0#13'Items.Strings'#1#6#3'And'#6#2'Or'#0#5'Style'#7#14'csD' + +'ropDownList'#8'TabOrder'#2#19#0#0#9'TComboBox'#10'ComboBox16'#22'AnchorSide' + +'Left.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7#10'ComboBox13'#18'Anch' + +'orSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox1'#20 + +'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#8#6'Height'#2#31#3'Top'#3#249 + +#0#5'Width'#3#149#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderS' + +'pacing.Left'#2#6#17'BorderSpacing.Top'#2#6#20'BorderSpacing.Around'#2#2#10 + +'ItemHeight'#2#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#20#0#0#9'TCombo' + +'Box'#10'ComboBox17'#22'AnchorSideLeft.Control'#7#9'ComboBox2'#21'AnchorSide' + +'Top.Control'#7#10'ComboBox13'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'Anch' + +'orSideRight.Control'#7#9'ComboBox2'#20'AnchorSideRight.Side'#7#9'asrBottom' + +#4'Left'#3#168#0#6'Height'#2#31#3'Top'#3#247#0#5'Width'#2'`'#7'Anchors'#11#5 + +'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#6#13'DropDownCount'#2 + +#9#10'ItemHeight'#2#0#8'OnChange'#7#14'ComboBoxChange'#5'Style'#7#14'csDropD' + +'ownList'#8'TabOrder'#2#21#0#0#5'TEdit'#5'Edit6'#22'AnchorSideLeft.Control'#7 + +#9'ComboBox2'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Contro' + +'l'#7#10'ComboBox13'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRigh' + +'t.Control'#7#9'ComboBox3'#4'Left'#3#14#1#6'Height'#2#27#3'Top'#3#247#0#5'Wi' + +'dth'#3#251#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing' + +'.Left'#2#6#17'BorderSpacing.Top'#2#6#8'OnChange'#7#10'EditChange'#8'TabOrde' + +'r'#2#22#0#0#9'TComboBox'#10'ComboBox18'#21'AnchorSideTop.Control'#7#10'Comb' + +'oBox13'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7 + +#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#15#2#6'Height'#2 + +#31#3'Top'#3#247#0#5'Width'#2'o'#7'Anchors'#11#5'akTop'#7'akRight'#0#20'Bord' + +'erSpacing.Around'#2#6#10'ItemHeight'#2#0#13'Items.Strings'#1#6#3'And'#6#2'O' + +'r'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#23#0#0#9'TComboBox'#10'Com' + +'boBox19'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideTop.Control'#7 + +#10'ComboBox16'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Con' + +'trol'#7#9'ComboBox1'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#2#8#6 + +'Height'#2#31#3'Top'#3' '#1#5'Width'#3#149#0#7'Anchors'#11#5'akTop'#6'akLeft' + +#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#20'Border' + +'Spacing.Around'#2#2#10'ItemHeight'#2#0#5'Style'#7#14'csDropDownList'#8'TabO' + +'rder'#2#24#0#0#9'TComboBox'#10'ComboBox20'#22'AnchorSideLeft.Control'#7#9'C' + +'omboBox2'#21'AnchorSideTop.Control'#7#10'ComboBox16'#18'AnchorSideTop.Side' + +#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox2'#20'AnchorSideRigh' + +'t.Side'#7#9'asrBottom'#4'Left'#3#168#0#6'Height'#2#31#3'Top'#3#30#1#5'Width' + +#2'`'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderSpacing.Top'#2#6 + +#13'DropDownCount'#2#9#10'ItemHeight'#2#0#8'OnChange'#7#14'ComboBoxChange'#5 + +'Style'#7#14'csDropDownList'#8'TabOrder'#2#25#0#0#5'TEdit'#5'Edit7'#22'Ancho' + +'rSideLeft.Control'#7#9'ComboBox2'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21 + +'AnchorSideTop.Control'#7#10'ComboBox16'#18'AnchorSideTop.Side'#7#9'asrBotto' + +'m'#23'AnchorSideRight.Control'#7#9'ComboBox3'#4'Left'#3#14#1#6'Height'#2#27 + +#3'Top'#3#30#1#5'Width'#3#251#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0 + +#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#8'OnChange'#7#10'EditC' + +'hange'#8'TabOrder'#2#26#0#0#9'TComboBox'#10'ComboBox21'#21'AnchorSideTop.Co' + +'ntrol'#7#10'ComboBox16'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSide' + +'Right.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3 + +#15#2#6'Height'#2#31#3'Top'#3#30#1#5'Width'#2'o'#7'Anchors'#11#5'akTop'#7'ak' + +'Right'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#13'Items.Strings'#1 + ,#6#3'And'#6#2'Or'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#27#0#0#9'TCo' + +'mboBox'#10'ComboBox22'#22'AnchorSideLeft.Control'#7#5'Owner'#21'AnchorSideT' + +'op.Control'#7#10'ComboBox19'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'Ancho' + +'rSideRight.Control'#7#9'ComboBox1'#20'AnchorSideRight.Side'#7#9'asrBottom'#4 + +'Left'#2#8#6'Height'#2#31#3'Top'#3'G'#1#5'Width'#3#149#0#7'Anchors'#11#5'akT' + +'op'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top' + +#2#6#20'BorderSpacing.Around'#2#2#10'ItemHeight'#2#0#5'Style'#7#14'csDropDow' + +'nList'#8'TabOrder'#2#28#0#0#9'TComboBox'#10'ComboBox23'#22'AnchorSideLeft.C' + +'ontrol'#7#9'ComboBox2'#21'AnchorSideTop.Control'#7#10'ComboBox19'#18'Anchor' + +'SideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox2'#20 + +'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#168#0#6'Height'#2#31#3'Top'#3 + +'E'#1#5'Width'#2'`'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#0#17'BorderS' + +'pacing.Top'#2#6#13'DropDownCount'#2#9#10'ItemHeight'#2#0#8'OnChange'#7#14'C' + +'omboBoxChange'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#29#0#0#5'TEdit'#5 + +'Edit8'#22'AnchorSideLeft.Control'#7#9'ComboBox2'#19'AnchorSideLeft.Side'#7#9 + +'asrBottom'#21'AnchorSideTop.Control'#7#10'ComboBox19'#18'AnchorSideTop.Side' + +#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox3'#4'Left'#3#14#1#6 + +'Height'#2#27#3'Top'#3'E'#1#5'Width'#3#251#0#7'Anchors'#11#5'akTop'#6'akLeft' + +#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.Top'#2#6#8'OnChang' + +'e'#7#10'EditChange'#8'TabOrder'#2#30#0#0#9'TComboBox'#10'ComboBox24'#21'Anc' + +'horSideTop.Control'#7#10'ComboBox19'#18'AnchorSideTop.Side'#7#9'asrBottom' + +#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBott' + +'om'#4'Left'#3#15#2#6'Height'#2#31#3'Top'#3'E'#1#5'Width'#2'o'#7'Anchors'#11 + +#5'akTop'#7'akRight'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#13'It' + +'ems.Strings'#1#6#3'And'#6#2'Or'#0#5'Style'#7#14'csDropDownList'#8'TabOrder' + +#2#31#0#0#9'TComboBox'#10'ComboBox25'#22'AnchorSideLeft.Control'#7#5'Owner' + +#21'AnchorSideTop.Control'#7#10'ComboBox22'#18'AnchorSideTop.Side'#7#9'asrBo' + +'ttom'#23'AnchorSideRight.Control'#7#9'ComboBox1'#20'AnchorSideRight.Side'#7 + +#9'asrBottom'#4'Left'#2#8#6'Height'#2#31#3'Top'#3'n'#1#5'Width'#3#149#0#7'An' + +'chors'#11#5'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'Bor' + +'derSpacing.Top'#2#6#20'BorderSpacing.Around'#2#2#10'ItemHeight'#2#0#5'Style' + +#7#14'csDropDownList'#8'TabOrder'#2' '#0#0#9'TComboBox'#10'ComboBox26'#22'An' + +'chorSideLeft.Control'#7#9'ComboBox2'#21'AnchorSideTop.Control'#7#10'ComboBo' + +'x22'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9 + +'ComboBox2'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#168#0#6'Height' + +#2#31#3'Top'#3'l'#1#5'Width'#2'`'#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight' + +#0#17'BorderSpacing.Top'#2#6#13'DropDownCount'#2#9#10'ItemHeight'#2#0#8'OnCh' + +'ange'#7#14'ComboBoxChange'#5'Style'#7#14'csDropDownList'#8'TabOrder'#2'!'#0 + +#0#5'TEdit'#5'Edit9'#22'AnchorSideLeft.Control'#7#9'ComboBox2'#19'AnchorSide' + +'Left.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#10'ComboBox22'#18'Anc' + +'horSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#9'ComboBox3'#4 + +'Left'#3#14#1#6'Height'#2#27#3'Top'#3'l'#1#5'Width'#3#251#0#7'Anchors'#11#5 + +'akTop'#6'akLeft'#7'akRight'#0#18'BorderSpacing.Left'#2#6#17'BorderSpacing.T' + +'op'#2#6#8'OnChange'#7#10'EditChange'#8'TabOrder'#2'"'#0#0#9'TComboBox'#10'C' + +'omboBox27'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBottom.Contro' + +'l'#7#5'Owner'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Height' + +#2#31#3'Top'#3#152#1#5'Width'#2':'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#20 + +'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#13'Items.Strings'#1#6#3'And'#6 + +#2'Or'#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2'#'#7'Visible'#8#0#0#7'T' + +'Button'#7'Button1'#23'AnchorSideRight.Control'#7#5'Owner'#20'AnchorSideRigh' + +'t.Side'#7#9'asrBottom'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSid' + +'eBottom.Side'#7#9'asrBottom'#4'Left'#3'M'#2#6'Height'#2#29#3'Top'#3#154#1#5 + +'Width'#2'1'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderS' + +'pacing.Around'#2#6#7'Caption'#6#5'Apply'#7'Default'#9#7'OnClick'#7#12'Butto' + +'n1Click'#8'TabOrder'#2'$'#0#0#7'TButton'#7'Button2'#23'AnchorSideRight.Cont' + +'rol'#7#7'Button1'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBott' + +'om.Side'#7#9'asrBottom'#4'Left'#3#12#2#6'Height'#2#29#3'Top'#3#154#1#5'Widt' + +'h'#2';'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpaci' + +'ng.Around'#2#6#6'Cancel'#9#7'Caption'#6#6'Cancel'#7'OnClick'#7#12'Button2Cl' + +'ick'#8'TabOrder'#2'%'#0#0#7'TButton'#7'Button3'#23'AnchorSideRight.Control' + +#7#7'Button2'#24'AnchorSideBottom.Control'#7#5'Owner'#21'AnchorSideBottom.Si' + +'de'#7#9'asrBottom'#4'Left'#3#180#1#6'Height'#2#29#3'Top'#3#154#1#5'Width'#2 + +'R'#7'Anchors'#11#7'akRight'#8'akBottom'#0#8'AutoSize'#9#20'BorderSpacing.Ar' + +'ound'#2#6#7'Caption'#6#12'Clear filter'#7'OnClick'#7#12'Button3Click'#8'Tab' + ,'Order'#2'&'#0#0#0 +]); diff --git a/components/rx/rxfilterby.lrt b/components/rx/rxfilterby.lrt new file mode 100644 index 000000000..237bf239f --- /dev/null +++ b/components/rx/rxfilterby.lrt @@ -0,0 +1,10 @@ +TRXFILTERBYFORM.CAPTION=Filter conditions +TRXFILTERBYFORM.LABEL1.CAPTION=Select filter expression for data +TRXFILTERBYFORM.LABEL2.CAPTION=On field: +TRXFILTERBYFORM.LABEL3.CAPTION=Operation : +TRXFILTERBYFORM.LABEL4.CAPTION=Conditions : +TRXFILTERBYFORM.LABEL5.CAPTION=Operand : +TRXFILTERBYFORM.LABEL6.CAPTION=End. +TRXFILTERBYFORM.BUTTON1.CAPTION=Apply +TRXFILTERBYFORM.BUTTON2.CAPTION=Cancel +TRXFILTERBYFORM.BUTTON3.CAPTION=Clear filter diff --git a/components/rx/rxfilterby.pas b/components/rx/rxfilterby.pas new file mode 100644 index 000000000..615b79b49 --- /dev/null +++ b/components/rx/rxfilterby.pas @@ -0,0 +1,349 @@ +unit rxfilterby; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, db; + +type + + { TrxFilterByForm } + + TrxFilterByForm = class(TForm) + Button1: TButton; + Button2: TButton; + Button3: TButton; + ComboBox1: TComboBox; + ComboBox10: TComboBox; + ComboBox11: TComboBox; + ComboBox12: TComboBox; + ComboBox13: TComboBox; + ComboBox14: TComboBox; + ComboBox15: TComboBox; + ComboBox16: TComboBox; + ComboBox17: TComboBox; + ComboBox18: TComboBox; + ComboBox19: TComboBox; + ComboBox2: TComboBox; + ComboBox20: TComboBox; + ComboBox21: TComboBox; + ComboBox22: TComboBox; + ComboBox23: TComboBox; + ComboBox24: TComboBox; + ComboBox25: TComboBox; + ComboBox26: TComboBox; + ComboBox27: TComboBox; + ComboBox3: TComboBox; + ComboBox4: TComboBox; + ComboBox5: TComboBox; + ComboBox6: TComboBox; + ComboBox7: TComboBox; + ComboBox8: TComboBox; + ComboBox9: TComboBox; + Edit1: TEdit; + Edit2: TEdit; + Edit3: TEdit; + Edit4: TEdit; + Edit5: TEdit; + Edit6: TEdit; + Edit7: TEdit; + Edit8: TEdit; + Edit9: TEdit; + Label1: TLabel; + Label2: TLabel; + Label3: TLabel; + Label4: TLabel; + Label5: TLabel; + Label6: TLabel; + procedure Button1Click(Sender: TObject); + procedure Button2Click(Sender: TObject); + procedure Button3Click(Sender: TObject); + procedure ComboBoxChange(Sender: TObject); + procedure EditChange(Sender: TObject); + procedure FormCreate(Sender: TObject); + private + Combo_1 : Array[1..9] of TComboBox; + Combo_2 : Array[1..9] of TComboBox; + Edit_1 : Array[1..9] of TEdit; + Combo_3 : Array[1..9] of TComboBox; + Table : TDataSet; + procedure ClearALL(adoTable : TDataSet); + function FindCombo(CB:TComboBox):Integer; + function FindEdit(ED:TEdit):Integer; + public + function Execute(adoTable : TDataSet; Var FilterStr : String; Var LastFilter : TstringList):Boolean; + end; + +var + rxFilterByForm: TrxFilterByForm; + +implementation +uses rxdconst; + +{ TrxFilterByForm } + +procedure TrxFilterByForm.Button2Click(Sender: TObject); +begin + ModalResult := mrCancel; +end; + +procedure TrxFilterByForm.Button3Click(Sender: TObject); +begin + ClearALL(Table); +end; + +procedure TrxFilterByForm.ComboBoxChange(Sender: TObject); +Var + CBN : Integer; + CB : TComboBox; +begin + CB := (Sender AS TComboBox); + CBN := FindCombo(CB); + if CBN=0 Then Exit; + if (CB.Text=' IS NULL ') Or (CB.Text=' IS NOT NULL ') Then + Begin + Edit_1[CBN].Text := ''; + Edit_1[CBN].Enabled := False; + Edit_1[CBN].Color := clInactiveCaption; + End + Else + Begin + Edit_1[CBN].Enabled := True; + Edit_1[CBN].Color := clWindow; + End; +end; + +procedure TrxFilterByForm.EditChange(Sender: TObject); +Var + EDN : Integer; + ED : TEdit; +begin + ED := (Sender AS TEdit); + EDN := FindEdit(ED); + if EDN=0 Then Exit; + if ED.Text='' Then Combo_1[EDN].ItemIndex:=-1; +end; + +procedure TrxFilterByForm.FormCreate(Sender: TObject); +begin + Label1.Caption:=sRxFilterFormSelectExp; + Label2.Caption:=sRxFilterFormSelectExp; + Label3.Caption:=sRxFilterFormOperaion; + Label4.Caption:=sRxFilterFormCondition; + Label5.Caption:=sRxFilterFormOperand; + Label6.Caption:=sRxFilterFormEnd; + Button3.Caption:=sRxFilterFormClear; + Button2.Caption:=sRxFilterFormCancel; + Button1.Caption:=sRxFilterFormApply; +end; + +procedure TrxFilterByForm.Button1Click(Sender: TObject); +begin + ModalResult := mrOK; +end; + +procedure TrxFilterByForm.ClearALL(adoTable : TDataSet); +var + X : Integer; +begin + //***************************************************************************** + Combo_1[1].Items.Clear; + Combo_1[1].Items.Add(''); + For X := 0 To adoTable.FieldCount-1 do + Begin + if (adoTable.Fields[X].FieldKind=fkData) And (adoTable.Fields[X].Visible) Then + Combo_1[1].Items.Add(adoTable.Fields[X].FieldName); + End; + Combo_1[1].ItemIndex := 0; + For X := 2 To 9 do + Begin + Combo_1[X].Items.Assign(Combo_1[1].Items); + Combo_1[X].ItemIndex := 0; + End; + + Combo_2[1].Items.Clear; + Combo_2[1].Items.Add(' = '); + Combo_2[1].Items.Add(' > '); + Combo_2[1].Items.Add(' < '); + Combo_2[1].Items.Add(' >= '); + Combo_2[1].Items.Add(' <= '); + Combo_2[1].Items.Add(' <> '); + Combo_2[1].Items.Add(' LIKE '); + Combo_2[1].Items.Add(' IS NULL '); + Combo_2[1].Items.Add(' IS NOT NULL '); + Combo_2[1].ItemIndex := 0; + for X := 2 To 9 do + begin + Combo_2[X].Items.Assign(Combo_2[1].Items); + Combo_2[X].ItemIndex := 0; + end; + for X := 1 To 9 do + begin + Combo_3[X].ItemIndex := 0; + end; + for X := 1 To 9 do Edit_1[X].Text := ''; + //***************************************************************************** +end; + +function TrxFilterByForm.Execute(adoTable : TDataSet; Var FilterStr : String; Var LastFilter : TstringList):Boolean; +Var + X : Integer; + P : Integer; + S : String; + SD : String; + FF : TField; +Begin + Result := False; + //***************************************************************************** + Combo_1[1]:= ComboBox1; + Combo_1[2]:= ComboBox4; + Combo_1[3]:= ComboBox7; + Combo_1[4]:= ComboBox10; + Combo_1[5]:= ComboBox13; + Combo_1[6]:= ComboBox16; + Combo_1[7]:= ComboBox19; + Combo_1[8]:= ComboBox22; + Combo_1[9]:= ComboBox25; + + Combo_2[1]:= ComboBox2; + Combo_2[2]:= ComboBox5; + Combo_2[3]:= ComboBox8; + Combo_2[4]:= ComboBox11; + Combo_2[5]:= ComboBox14; + Combo_2[6]:= ComboBox17; + Combo_2[7]:= ComboBox20; + Combo_2[8]:= ComboBox23; + Combo_2[9]:= ComboBox26; + + Combo_3[1]:= ComboBox3; + Combo_3[2]:= ComboBox6; + Combo_3[3]:= ComboBox9; + Combo_3[4]:= ComboBox12; + Combo_3[5]:= ComboBox15; + Combo_3[6]:= ComboBox18; + Combo_3[7]:= ComboBox21; + Combo_3[8]:= ComboBox24; + Combo_3[9]:= ComboBox27; + Combo_3[9].Visible := False; + + Edit_1[1] := Edit1; + Edit_1[2] := Edit2; + Edit_1[3] := Edit3; + Edit_1[4] := Edit4; + Edit_1[5] := Edit5; + Edit_1[6] := Edit6; + Edit_1[7] := Edit7; + Edit_1[8] := Edit8; + Edit_1[9] := Edit9; + + //***************************************************************************** + Table := adoTable; + ClearALL(Table); + if LastFilter.Count > 0 Then + Begin + For X := 0 To LastFilter.Count-1 do + Begin + S := LastFilter.Strings[X]; + P := Pos('|||',S); + if P > 0 Then + Begin + Combo_1[X+1].ItemIndex := Combo_1[X+1].Items.IndexOf(System.Copy(S,1,P-1)); + System.Delete(S,1,P+2); + End; + P := Pos('|||',S); + if P > 0 Then + Begin + SD:=System.Copy(S,1,P-1); + Combo_2[X+1].ItemIndex := Combo_2[X+1].Items.IndexOf(System.Copy(S,1,P-1)); + System.Delete(S,1,P+2); + if (SD=' IS NULL ') or (SD=' IS NOT NULL ') Then + Begin + Edit_1[X+1].Text := ''; + Edit_1[X+1].Enabled := False; + Edit_1[X+1].Color := clInactiveCaption; + End; + End; + P := Pos('|||',S); + if P > 0 Then + Begin + Edit_1[X+1].Text := System.Copy(S,1,P-1); + System.Delete(S,1,P+2); + End; + Combo_3[X+1].ItemIndex := Combo_3[X+1].Items.IndexOf(S); + if Combo_3[X+1].ItemIndex = -1 Then Combo_3[X+1].ItemIndex := 0; + End; + End; + + ShowModal; + if ModalResult=mrOK Then + Begin + Result := True; + FilterStr := ''; + LastFilter.Clear; + For X := 1 to 9 Do + Begin + if (Combo_1[X].Text <> '') + And (Combo_2[X].Text <> '') Then + Begin + if (Edit_1[X].Enabled=False) or (Edit_1[X].Text <> '') Then + Begin + if X>1 Then + FilterStr := FilterStr+Combo_3[X-1].Text+' '; + FF := Table.FindField(Combo_1[X].Text); + Case FF.DataType of + ftDateTime , + ftDate : FilterStr := FilterStr+'('+Combo_1[X].Text+Combo_2[X].Text+Char(39)+Copy(Edit_1[X].Text,7,4)+Copy(Edit_1[X].Text,3,4)+Copy(Edit_1[X].Text,1,2)+Copy(Edit_1[X].Text,11,9)+Char(39)+') '; + ftUnknown : FilterStr := FilterStr+'('+Combo_1[X].Text+Combo_2[X].Text+Edit_1[X].Text+') '; + ftTime, + ftString, + ftMemo : FilterStr := FilterStr+'('+Combo_1[X].Text+Combo_2[X].Text+Char(39)+Edit_1[X].Text+Char(39)+') '; + else + FilterStr := FilterStr+'('+Combo_1[X].Text+Combo_2[X].Text+Edit_1[X].Text+') '; + End; + LastFilter.Add(Combo_1[X].Text+'|||'+Combo_2[X].Text+'|||'+Edit_1[X].Text+'|||'+Combo_3[X].Text); + End; + End; + End; + End; +End; + +Function TrxFilterByForm.FindCombo(CB:TComboBox):Integer; +Var + X : Integer; +Begin + Result :=0; + For X := 1 to 9 do + Begin + if Combo_2[X]=CB Then + Begin + Result := X; + Exit; + End; + End; +End; + +Function TrxFilterByForm.FindEdit(ED:TEdit):Integer; +Var + X : Integer; +Begin + Result :=0; + For X := 1 to 9 do + Begin + if Edit_1[X]=ED Then + Begin + Result := X; + Exit; + End; + End; +End; + + + +initialization + {$I rxfilterby.lrs} + +end. + diff --git a/components/rx/rxlookup.pas b/components/rx/rxlookup.pas index 373056ef3..dc03c4060 100644 --- a/components/rx/rxlookup.pas +++ b/components/rx/rxlookup.pas @@ -144,6 +144,12 @@ type FDisplayAll: boolean; FUnfindedValue: TRxDBValueVariant; FSuccesfullyFind : boolean; + + FOnSelect : TNotifyEvent; + procedure SetValue(const Value: string); + function GetKeyValue: Variant; + procedure SetKeyValue(const Value: Variant); + function GetDataSource: TDataSource; function GetDisplayAll: Boolean; function GetDropDownCount: Integer; @@ -242,6 +248,11 @@ type property LookupSource: TDataSource read GetLookupSource write SetLookupSource; property OnGetGridCellProps: TGetCellPropsEvent read GetOnGetGridCellProps write SetOnGetGridCellProps; + + property Value: string read FValue write SetValue stored False; + property KeyValue: Variant read GetKeyValue write SetKeyValue stored False; + property OnSelect: TNotifyEvent read FOnSelect write FOnSelect; + property UnfindedValue : TRxDBValueVariant read FUnfindedValue write FUnfindedValue default rxufNone; public constructor Create(AOwner: TComponent); override; @@ -253,6 +264,9 @@ type TRxDBLookupCombo = class(TRxCustomDBLookupCombo) protected procedure OnClosePopup(AResult:boolean);override; + public + property Value; + property KeyValue; published property AutoSize; property Align; @@ -292,6 +306,8 @@ type property OnMouseUp; property OnStartDrag; property OnGetGridCellProps; + property OnSelect; + property ParentColor; property ParentFont; property ParentShowHint; @@ -914,6 +930,25 @@ var F:TField; begin FValuesList.Clear; + if not Assigned(FDataField) then + begin + if FLookupDataLink.Active then + if (Self.FSuccesfullyFind) or (Self.UnfindedValue = rxufLastSuccessful) then + begin + for i:=0 to FFieldList.Count-1 do + begin + F:=FLookupDataLink.DataSet.FieldByName(FFieldList[i]); + k:=FValuesList.Add(F.DisplayText); + FValuesList.Objects[k]:=TObject(PtrInt(F.DisplayWidth)); + end; + end + else + case Self.UnfindedValue of + rxufNone : {Do nothing}; + rxufOriginal : FValuesList.Add(FValue);//Show original field value... + end; + end + else if Assigned(FDataField) then begin if FDataField.IsNull then @@ -938,24 +973,43 @@ begin end; procedure TRxCustomDBLookupCombo.ShowList; +{$IFDEF LINUX} +var + TempF:TPopUpForm; +{$ENDIF} begin if Assigned(FLookupDataLink.DataSet) and (FLookupDataLink.DataSet.Active) then if not PopupVisible then begin + if FDataField<>nil then + if FDataField <> nil then + FValue := FDataField.AsString + else + FValue := FEmptyValue; - if FDataField <> nil then FValue := FDataField.AsString - else FValue := FEmptyValue; + if not Assigned(FDataField) then + begin + if not FLocateObject.Locate(FLookupField, FValue, true, false) then + FLookupDataLink.DataSet.First; + end + else if Assigned(FDataField) and not FDataField.IsNull then - Begin - if not FLocateObject.Locate(FLookupField, FValue, true, false) then - FLookupDataLink.DataSet.First;//In case we cannot find curvalue... - End + begin + if not FLocateObject.Locate(FLookupField, FValue, true, false) then + FLookupDataLink.DataSet.First;//In case we cannot find curvalue... + end else if FLookupDataLink.Active then FLookupDataLink.DataSet.First; FRxPopUpForm:=ShowRxDBPopUpForm(Self, FLookupDataLink.DataSet, @OnClosePopup, FPopUpFormOptions, FLookupDisplay, LookupDisplayIndex, 0 {ButtonWidth}, Font); +{$IFDEF LINUX} + TempF:=FRxPopUpForm; + if FRxPopUpForm.ShowModal = mrOk then + OnClosePopup(true); + TempF.Free; +{$ENDIF} end end; @@ -975,10 +1029,23 @@ end; procedure TRxCustomDBLookupCombo.UpdateKeyValue; begin - if FDataField <> nil then - FValue := FDataField.AsString + if Assigned(FDataField) then + if FDataField <> nil then + FValue := FDataField.AsString + else + FValue := FEmptyValue; + + if not Assigned(FDataField) then + begin + if FValue=FEmptyValue then + FSuccesfullyFind := false + else + FSuccesfullyFind := FLocateObject.Locate(FLookupField, FValue, true, false); + end + else + if FDataField.IsNull then + FSuccesfullyFind := false else - FValue := FEmptyValue; if not FDataField.IsNull then FSuccesfullyFind := FLocateObject.Locate(FLookupField, FValue, true, false); KeyValueChanged; @@ -1010,12 +1077,32 @@ begin if Assigned(FRxPopUpForm) and AResult and (pfgColumnResize in FPopUpFormOptions.Options) then FillPopupWidth(FPopUpFormOptions, FRxPopUpForm); + if FRxPopUpForm=nil then + begin + SetFocus; + Exit; + end; FRxPopUpForm:=nil; + if not AResult then + UpdateKeyValue + else + if AResult and not Assigned(FDataLink.DataSource) and (FLookupDataLink.Active) then + begin + if FKeyField.IsNull then + SetValueKey(FEmptyValue) + else + SetValueKey(FKeyField.AsString); + end + else + if AResult and Assigned(FDataLink.DataSource) then begin FDataLink.Edit; NeedUpdateData;//We need to update DataField; end; + + if (AResult) and (Assigned(FOnSelect)) then + FOnSelect(Self); end; procedure TRxCustomDBLookupCombo.DoAutoSize; @@ -1049,10 +1136,20 @@ begin Key := 0; end else - if (Key = VK_ESCAPE) and (not FDataField.IsNull) then + if (Key = VK_ESCAPE) and not (Assigned(FDataField)) then + begin + SetValueKey(FEmptyValue); + if Assigned(FOnSelect) then + FOnSelect(Self); + Key:=0; + end + else + if (Key = VK_ESCAPE) and (not FDataField.IsNull) and (FDataLink.Edit) then begin FDataField.Clear; UpdateKeyValue; + if Assigned(FOnSelect) then + FOnSelect(Self); Key:=0; end; end; @@ -1075,15 +1172,36 @@ begin end; //FDataLink.UpdateRecord; -- no need more... Self.NeedUpdateData; + if Assigned(FOnSelect) then + FOnSelect(Self); KeyValueChanged; Key:=0; end + end + else + if FLookupDataLink.Active and not (PopupVisible or ReadOnly) then + begin + if (Key in [VK_UP, VK_DOWN]) and (Shift = []) then + begin + case Key of + VK_UP: if not FLookupDataLink.DataSet.BOF then + FLookupDataLink.DataSet.Prior; + VK_DOWN: if not FLookupDataLink.DataSet.EOF then + FLookupDataLink.DataSet.Next; + end; + SetValueKey(FKeyField.AsString); + if Assigned(FOnSelect) then + FOnSelect(Self); + Key:=0; + end end; end; procedure TRxCustomDBLookupCombo.KeyPress(var Key: char); begin + if not (PopupVisible) and ((Key in [#32..#255]) or (Key=#8)) then + ShowList; inherited KeyPress(Key); if PopupVisible then FRxPopUpForm.KeyPress(Key); @@ -1174,12 +1292,14 @@ begin { If not Self.PopupVisible then DoButtonClick(Self);} end; + procedure TRxCustomDBLookupCombo.Click; begin inherited Click; If not Self.PopupVisible then DoButtonClick(Self); end; + procedure TRxCustomDBLookupCombo.Paint; var Selected:boolean; @@ -1217,6 +1337,12 @@ begin SetRect(R1, 3, 3, ClientWidth - 3, ClientHeight - 3); Canvas.FillRect(R1); R.Right:=R.Right - GetButtonWidth; + if PopupVisible and (Caption<>'') then + begin + AText:=Caption; + Canvas.TextRect(R, TextMargin, Max(0, (HeightOf(R) - Canvas.TextHeight('Wg')) div 2), AText); + end + else if FDisplayAll then PaintDisplayValues(Canvas, R, TextMargin) else @@ -1241,6 +1367,7 @@ procedure TRxCustomDBLookupCombo.LookupDataSetChanged(Sender: TObject); begin if PopupVisible then begin + FSuccesfullyFind := true; UpdateFieldValues; Invalidate; end; @@ -1260,6 +1387,7 @@ begin DataSet := FLookupDataLink.DataSet; FKeyField := DataSet.FieldByName(FLookupField); FListActive := True; + FDisplayField := FLookupDataLink.DataSet.FieldByName(FFieldList[FLookupDisplayIndex]); end; FLocateObject.DataSet := DataSet; @@ -1268,6 +1396,32 @@ begin else KeyValueChanged; end; +procedure TRxCustomDBLookupCombo.SetValue(const Value: string); +begin + if (Value <> FValue) then + begin + if FListActive and not ReadOnly and (FDataLink.DataSource <> nil) and FDataLink.Edit then + FDataField.AsString := Value + else + SetValueKey(Value); + if Assigned(FOnSelect) then + FOnSelect(Self); + end; +end; + +function TRxCustomDBLookupCombo.GetKeyValue: Variant; +begin + if Value = FEmptyValue then + Result := null + else + Result := Value; +end; + +procedure TRxCustomDBLookupCombo.SetKeyValue(const Value: Variant); +begin + Self.Value := Value; +end; + constructor TRxCustomDBLookupCombo.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -1389,7 +1543,7 @@ end; procedure TRxDBLookupCombo.OnClosePopup(AResult: boolean); begin inherited OnClosePopup(AResult); - SetFocus; +// SetFocus; { if (Owner is TWinControl) then TWinControl(Owner).Repaint else diff --git a/components/rx/rxmemds.pas b/components/rx/rxmemds.pas index 8834ac996..6cea00023 100644 --- a/components/rx/rxmemds.pas +++ b/components/rx/rxmemds.pas @@ -207,10 +207,6 @@ implementation uses Forms, rxdconst, dbconst, Variants; -resourcestring - SMemNoRecords = 'No data found'; - SInvalidFields = 'No fields defined'; - const ftBlobTypes = [ftBlob, ftMemo, ftGraphic, ftFmtMemo, ftParadoxOle, ftDBaseOle, ftTypedBinary, ftOraBlob, ftOraClob]; diff --git a/components/rx/rxnew.lpk b/components/rx/rxnew.lpk index 7581e515c..08fe652f6 100644 --- a/components/rx/rxnew.lpk +++ b/components/rx/rxnew.lpk @@ -26,7 +26,7 @@ translate to Lazarus by alexs in 2005 - 2009 - + @@ -233,7 +233,23 @@ translate to Lazarus by alexs in 2005 - 2009 + + + + + + + + + + + + + + + + diff --git a/components/rx/rxnew.pas b/components/rx/rxnew.pas index 8cd505d95..f3d581174 100644 --- a/components/rx/rxnew.pas +++ b/components/rx/rxnew.pas @@ -16,7 +16,7 @@ uses rxdbgrid_findunit, rxdbgrid_columsunit, rxpopupunit, rxcustomchartpanel, rxsortmemds, AutoPanel, pickdate, rxiconv, rxceEditLookupFields, rxclock, rxspin, RxDBSpinEdit, RegisterRxDB, RxTimeEdit, RxDBTimeEdit, RxDBCtrls, - LazarusPackageIntf; + rxfilterby, LazarusPackageIntf; implementation diff --git a/components/rx/rxpopupunit.pas b/components/rx/rxpopupunit.pas index a584c3fe1..49977cf19 100644 --- a/components/rx/rxpopupunit.pas +++ b/components/rx/rxpopupunit.pas @@ -167,6 +167,7 @@ type FOnPopUpCloseEvent:TPopUpCloseEvent; FPopUpFormOptions:TPopUpFormOptions; FRowCount:word; + WControl:TWinControl; function GetDataSet: TDataSet; function GetLookupDisplayIndex: integer; procedure SetDataSet(const AValue: TDataSet); @@ -210,6 +211,9 @@ begin Result.DataSet:=ADataSet; Result.LookupDisplayIndex:=ALookupDisplayIndex; + AControl.Caption:=''; + Result.WControl:=AControl; + if Assigned(Font) then begin Result.FGrid.Font.Assign(Font); @@ -217,11 +221,11 @@ begin end; {$IFDEF LINUX} - if Result.ShowModal = mrOk then +{ if Result.ShowModal = mrOk then if Assigned(AOnPopUpCloseEvent) then AOnPopUpCloseEvent(true); Result.Free; - Result:=nil; + Result:=nil;} {$ELSE LINUX} Result.Show; Result.FGrid.UpdateActive; @@ -293,7 +297,7 @@ begin inherited KeyDown(Key, Shift); end; FGrid.KeyDown(Key, Shift); - Key:=0; +// Key:=0; Invalidate; end; @@ -759,27 +763,67 @@ end; procedure TPopUpGrid.ClearFind; begin + TPopUpForm(Owner).WControl.Caption:=' '; + TPopUpForm(Owner).WControl.Repaint; FFindLine:=''; if DatalinkActive then DataSource.DataSet.First; end; procedure TPopUpGrid.FindNextChar(AChar: Char); +var + F:string; begin FFindLine:=FFindLine + AChar; if DatalinkActive then - DataSetLocateThrough(DataSource.DataSet, FLookupDisplayField, FFindLine, [loCaseInsensitive, loPartialKey]); +{ if true then + begin} + if DataSetLocateThrough(DataSource.DataSet, FLookupDisplayField, FFindLine, [loCaseInsensitive, loPartialKey]) then + begin + TPopUpForm(Owner).WControl.Caption:=FFindLine; + TPopUpForm(Owner).WControl.Repaint; + end + else + FFindLine:=F; +{ end + else + DataSetLocateThrough(DataSource.DataSet, FLookupDisplayField, FFindLine, [loCaseInsensitive, loPartialKey]);} end; procedure TPopUpGrid.FindPriorChar; +var + F:string; begin if FFindLine = '' then exit; + F:=FFindLine; Delete(FFindLine, Length(FFindLine), 1); if DatalinkActive then + if (FFindLine<>'') then + begin + if true then + begin + if DataSetLocateThrough(DataSource.DataSet, FLookupDisplayField, FFindLine, [loCaseInsensitive, loPartialKey]) then + begin + TPopUpForm(Owner).WControl.Caption:=FFindLine; + TPopUpForm(Owner).WControl.Repaint; + end + else + FFindLine:=F; + end + else + DataSetLocateThrough(DataSource.DataSet, FLookupDisplayField, FFindLine, [loCaseInsensitive, loPartialKey]) + end + else + begin + TPopUpForm(Owner).WControl.Caption:=' '; + TPopUpForm(Owner).WControl.Repaint; + DataSource.DataSet.First; + end; +{ if DatalinkActive then if (FFindLine<>'') then DataSetLocateThrough(DataSource.DataSet, FLookupDisplayField, FFindLine, [loCaseInsensitive, loPartialKey]) else - DataSource.DataSet.First; + DataSource.DataSet.First;} end; procedure TPopUpGrid.SetLookupDisplayIndex(const AValue: integer); @@ -791,6 +835,12 @@ end; procedure TPopUpGrid.KeyPress(var Key: char); begin inherited KeyPress(Key); + if (Columns[FLookupDisplayIndex].Field.DataType<>ftString) and not (Key in ['0'..'9']) then + Exit + else + if Key=#32 then + FindNextChar(Key) + else if Key>#32 then FindNextChar(Key) else @@ -800,6 +850,32 @@ end; procedure TPopUpGrid.KeyDown(var Key: Word; Shift: TShiftState); begin + if true then + begin + if Key = VK_DELETE then + begin + ClearFind; + Key:=0; + end + else + if Key = VK_BACK then + begin + FindPriorChar; + Key:=0; + end + else + begin + if Key in [VK_UP,VK_DOWN,VK_PRIOR,VK_NEXT] then + begin + FFindLine:=''; + TPopUpForm(Owner).WControl.Caption:=''; + TPopUpForm(Owner).WControl.Repaint; + end; + inherited KeyDown(Key, Shift); + exit; + end; + end +{ else if (Key>=Ord('0')) and (Key<=Ord('9')) then FindNextChar(Char(Key)) else @@ -816,7 +892,7 @@ begin inherited KeyDown(Key, Shift); exit; end; - Key:=0; + Key:=0;} end; end. diff --git a/components/rx/rxsortby.lfm b/components/rx/rxsortby.lfm new file mode 100644 index 000000000..c3ee34292 --- /dev/null +++ b/components/rx/rxsortby.lfm @@ -0,0 +1,241 @@ +object rxSortByForm: TrxSortByForm + Left = 450 + Height = 337 + Top = 270 + Width = 583 + ActiveControl = AddBtn + Caption = 'Sort by fields' + ClientHeight = 337 + ClientWidth = 583 + OnClose = FormClose + OnCreate = FormCreate + Position = poScreenCenter + LCLVersion = '0.9.27' + object Label1: TLabel + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Owner + Left = 6 + Height = 18 + Top = 6 + Width = 131 + BorderSpacing.Around = 6 + Caption = '&Fields for sorting:' + FocusControl = ListBox1 + ParentColor = False + end + object Label2: TLabel + AnchorSideLeft.Control = AddBtn + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Owner + Left = 352 + Height = 18 + Top = 6 + Width = 75 + BorderSpacing.Around = 6 + Caption = '&All fields:' + FocusControl = ListBox2 + ParentColor = False + end + object Label4: TLabel + AnchorSideLeft.Control = Owner + AnchorSideBottom.Control = ComboBox1 + AnchorSideBottom.Side = asrBottom + Left = 6 + Height = 18 + Top = 265 + Width = 116 + Anchors = [akLeft, akBottom] + BorderSpacing.Left = 6 + Caption = 'Select sort order' + FocusControl = ComboBox1 + ParentColor = False + end + object ListBox2: TListBox + AnchorSideLeft.Control = AddBtn + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = Label2 + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = ComboBox1 + Left = 352 + Height = 216 + Top = 30 + Width = 225 + Anchors = [akTop, akLeft, akRight, akBottom] + BorderSpacing.Around = 6 + ItemHeight = 0 + OnDblClick = ListBox2DblClick + TabOrder = 0 + TopIndex = -1 + end + object RemoveBtn: TBitBtn + AnchorSideLeft.Control = AddBtn + AnchorSideTop.Control = AddBtn + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = AddBtn + AnchorSideRight.Side = asrBottom + Left = 197 + Height = 35 + Top = 71 + Width = 149 + Anchors = [akTop, akLeft, akRight] + AutoSize = True + BorderSpacing.Top = 6 + Caption = '&Remove' + Glyph.Data = { + 8A010000424D8A01000000000000760000002800000018000000170000000100 + 0400000000001401000000000000000000001000000010000000000000000000 + 80000080000000808000800000008000800080800000C0C0C000808080000000 + C80000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777 + 7777777777777777777777877777777777777777777777007777777777777777 + 7777770907777777777777777777770990777777777777777777770999077777 + 7777777777777709999077777777777800000009999907777777777099999999 + 9999907777777770999999999999990777777770999999999999999077777770 + 9999999999999999F7777770999999999999999F7777777099999999999999F7 + 777777709999999999999F7777777778FFFFFF899999F7777777777777777789 + 999F7777777777777777778999F7777777777777777777899F77777777777777 + 77777789F7777777777777777777778F7777777777777777777777F777777777 + 7777777777777777777777777777 + } + Layout = blGlyphRight + NumGlyphs = 0 + OnClick = RemoveBtnClick + TabOrder = 2 + end + object UpBtn: TBitBtn + AnchorSideLeft.Control = AddBtn + AnchorSideTop.Control = RemoveBtn + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = AddBtn + AnchorSideRight.Side = asrBottom + Left = 197 + Height = 36 + Top = 112 + Width = 149 + Anchors = [akTop, akLeft, akRight] + AutoSize = True + BorderSpacing.Top = 6 + Caption = 'M&ove up' + Glyph.Data = { + 96010000424D9601000000000000760000002800000017000000180000000100 + 0400000000002001000000000000000000001000000010000000000000000000 + 80000080000000808000800000008000800080800000C0C0C000808080000000 + C80000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777 + 7777777777707777777777777777777777707777777777777777777777707777 + 77780000000877777770777777709999999F77777770777777709999999F7777 + 7770777777709999999F77777770777777709999999F77777770777777709999 + 999F77777770777777709999999F77777770780000009999999888888F707709 + 9999999999999999F7707770999999999999999F7770777709999999999999F7 + 777077777099999999999F7777707777770999999999F7777770777777709999 + 999F7777777077777777099999F7777777707777777770999F77777777707777 + 77777709F7777777777077777777777F77777777777077777777777777777777 + 7770777777777777777777777770777777777777777777777770 + } + NumGlyphs = 0 + OnClick = UpBtnClick + TabOrder = 3 + end + object DownBtn: TBitBtn + AnchorSideLeft.Control = AddBtn + AnchorSideTop.Control = UpBtn + AnchorSideTop.Side = asrBottom + AnchorSideRight.Control = AddBtn + AnchorSideRight.Side = asrBottom + Left = 197 + Height = 36 + Top = 154 + Width = 149 + Anchors = [akTop, akLeft, akRight] + AutoSize = True + BorderSpacing.Top = 6 + Caption = '&Move down' + Glyph.Data = { + 96010000424D9601000000000000760000002800000017000000180000000100 + 0400000000002001000000000000000000001000000010000000000000000000 + 80000080000000808000800000008000800080800000C0C0C000808080000000 + C80000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777 + 7777777777707777777777777777777777707777777777777777777777707777 + 7777777F777777777770777777777709F777777777707777777770999F777777 + 777077777777099999F777777770777777709999999F77777770777777099999 + 9999F777777077777099999999999F777770777709999999999999F777707770 + 999999999999999F777077099999999999999999F77078000000999999988888 + 8F70777777709999999F77777770777777709999999F77777770777777709999 + 999F77777770777777709999999F77777770777777709999999F777777707777 + 77709999999F7777777077777778000000087777777077777777777777777777 + 7770777777777777777777777770777777777777777777777770 + } + NumGlyphs = 0 + OnClick = DownBtnClick + TabOrder = 4 + end + object ComboBox1: TComboBox + AnchorSideLeft.Control = Label4 + AnchorSideLeft.Side = asrBottom + AnchorSideRight.Control = Owner + AnchorSideRight.Side = asrBottom + AnchorSideBottom.Control = ButtonPanel1 + Left = 128 + Height = 31 + Top = 252 + Width = 449 + Anchors = [akLeft, akRight, akBottom] + BorderSpacing.Around = 6 + ItemHeight = 0 + Style = csDropDownList + TabOrder = 5 + end + object ListBox1: TListBox + AnchorSideLeft.Control = Owner + AnchorSideTop.Control = Label1 + AnchorSideTop.Side = asrBottom + AnchorSideBottom.Control = ComboBox1 + Left = 6 + Height = 216 + Top = 30 + Width = 185 + Anchors = [akTop, akLeft, akBottom] + BorderSpacing.Around = 6 + ItemHeight = 0 + OnDblClick = ListBox1DblClick + TabOrder = 6 + TopIndex = -1 + end + object AddBtn: TBitBtn + AnchorSideLeft.Control = ListBox1 + AnchorSideLeft.Side = asrBottom + AnchorSideTop.Control = ListBox1 + Left = 197 + Height = 35 + Top = 30 + Width = 149 + AutoSize = True + Caption = '&Add field to sort' + Glyph.Data = { + 8A010000424D8A01000000000000760000002800000018000000170000000100 + 0400000000001401000000000000000000001000000010000000000000000000 + 80000080000000808000800000008000800080800000C0C0C000808080000000 + C80000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF00777777777777 + 7777777777777777777777777877777777777777777777770077777777777777 + 7777777090777777777777777777770990777777777777777777709990777777 + 7777777777770999907777777777777777709999900000008777777777099999 + 999999990777777770999999999999990777777709999999999999990777777F + 999999999999999907777777F999999999999999077777777F99999999999999 + 0777777777F999999999999907777777777F999998FFFFFF877777777777F999 + 987777777777777777777F999877777777777777777777F99877777777777777 + 7777777F987777777777777777777777F877777777777777777777777F777777 + 7777777777777777777777777777 + } + NumGlyphs = 0 + OnClick = AddBtnClick + TabOrder = 1 + end + object ButtonPanel1: TButtonPanel + Left = 6 + Height = 42 + Top = 289 + Width = 571 + TabOrder = 7 + ShowButtons = [pbOK, pbCancel, pbHelp] + end +end diff --git a/components/rx/rxsortby.lrs b/components/rx/rxsortby.lrs new file mode 100644 index 000000000..460a74258 --- /dev/null +++ b/components/rx/rxsortby.lrs @@ -0,0 +1,112 @@ +{ Este es un archivo de recurso de Lazarus generado automáticamente } + +LazarusResources.Add('TrxSortByForm','FORMDATA',[ + 'TPF0'#13'TrxSortByForm'#12'rxSortByForm'#4'Left'#3#194#1#6'Height'#3'Q'#1#3 + +'Top'#3#14#1#5'Width'#3'G'#2#13'ActiveControl'#7#6'AddBtn'#7'Caption'#6#14'S' + +'ort by fields'#12'ClientHeight'#3'Q'#1#11'ClientWidth'#3'G'#2#7'OnClose'#7#9 + +'FormClose'#8'OnCreate'#7#10'FormCreate'#8'Position'#7#14'poScreenCenter'#10 + +'LCLVersion'#6#6'0.9.27'#0#6'TLabel'#6'Label1'#22'AnchorSideLeft.Control'#7#5 + +'Owner'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#2#6#6'Height'#2#18#3'To' + +'p'#2#6#5'Width'#3#131#0#20'BorderSpacing.Around'#2#6#7'Caption'#6#20'&Field' + +'s for sorting:'#12'FocusControl'#7#8'ListBox1'#11'ParentColor'#8#0#0#6'TLab' + +'el'#6'Label2'#22'AnchorSideLeft.Control'#7#6'AddBtn'#19'AnchorSideLeft.Side' + +#7#9'asrBottom'#21'AnchorSideTop.Control'#7#5'Owner'#4'Left'#3'`'#1#6'Height' + +#2#18#3'Top'#2#6#5'Width'#2'K'#20'BorderSpacing.Around'#2#6#7'Caption'#6#12 + +'&All fields:'#12'FocusControl'#7#8'ListBox2'#11'ParentColor'#8#0#0#6'TLabel' + +#6'Label4'#22'AnchorSideLeft.Control'#7#5'Owner'#24'AnchorSideBottom.Control' + +#7#9'ComboBox1'#21'AnchorSideBottom.Side'#7#9'asrBottom'#4'Left'#2#6#6'Heigh' + +'t'#2#18#3'Top'#3#9#1#5'Width'#2't'#7'Anchors'#11#6'akLeft'#8'akBottom'#0#18 + +'BorderSpacing.Left'#2#6#7'Caption'#6#17'Select sort order'#12'FocusControl' + +#7#9'ComboBox1'#11'ParentColor'#8#0#0#8'TListBox'#8'ListBox2'#22'AnchorSideL' + +'eft.Control'#7#6'AddBtn'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSi' + +'deTop.Control'#7#6'Label2'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorS' + +'ideRight.Control'#7#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'Anc' + +'horSideBottom.Control'#7#9'ComboBox1'#4'Left'#3'`'#1#6'Height'#3#216#0#3'To' + +'p'#2#30#5'Width'#3#225#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight'#8'akBo' + +'ttom'#0#20'BorderSpacing.Around'#2#6#10'ItemHeight'#2#0#10'OnDblClick'#7#16 + +'ListBox2DblClick'#8'TabOrder'#2#0#8'TopIndex'#2#255#0#0#7'TBitBtn'#9'Remove' + +'Btn'#22'AnchorSideLeft.Control'#7#6'AddBtn'#21'AnchorSideTop.Control'#7#6'A' + +'ddBtn'#18'AnchorSideTop.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7#6 + +'AddBtn'#20'AnchorSideRight.Side'#7#9'asrBottom'#4'Left'#3#197#0#6'Height'#2 + +'#'#3'Top'#2'G'#5'Width'#3#149#0#7'Anchors'#11#5'akTop'#6'akLeft'#7'akRight' + +#0#8'AutoSize'#9#17'BorderSpacing.Top'#2#6#7'Caption'#6#7'&Remove'#10'Glyph.' + +'Data'#10#142#1#0#0#138#1#0#0'BM'#138#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0 + +#0#23#0#0#0#1#0#4#0#0#0#0#0#20#1#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0 + +#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192 + +#192#0#128#128#128#0#0#0#200#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0 + +#255#255#0#0#255#255#255#0'wwwwwwwwwwwwwwwww'#135'wwwwwwwwwww'#0'wwwwwwwwwww' + +#9#7'wwwwwwwwww'#9#144'wwwwwwwwww'#9#153#7'wwwwwwwww'#9#153#144'wwwwwx'#0#0#0 + +#9#153#153#7'wwwwp'#153#153#153#153#153#153#144'wwwwp'#153#153#153#153#153 + +#153#153#7'wwwp'#153#153#153#153#153#153#153#144'wwwp'#153#153#153#153#153 + +#153#153#153#247'wwp'#153#153#153#153#153#153#153#159'wwwp'#153#153#153#153 + +#153#153#153#247'wwwp'#153#153#153#153#153#153#159'wwwwx'#255#255#255#137#153 + +#153#247'wwwwwwww'#137#153#159'wwwwwwwww'#137#153#247'wwwwwwwww'#137#159'www' + +'wwwwwww'#137#247'wwwwwwwwww'#143'wwwwwwwwwww'#247'wwwwwwwwwwwwwwwwww'#6'Lay' + +'out'#7#12'blGlyphRight'#9'NumGlyphs'#2#0#7'OnClick'#7#14'RemoveBtnClick'#8 + +'TabOrder'#2#2#0#0#7'TBitBtn'#5'UpBtn'#22'AnchorSideLeft.Control'#7#6'AddBtn' + +#21'AnchorSideTop.Control'#7#9'RemoveBtn'#18'AnchorSideTop.Side'#7#9'asrBott' + +'om'#23'AnchorSideRight.Control'#7#6'AddBtn'#20'AnchorSideRight.Side'#7#9'as' + +'rBottom'#4'Left'#3#197#0#6'Height'#2'$'#3'Top'#2'p'#5'Width'#3#149#0#7'Anch' + +'ors'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#17'BorderSpacing.Top' + +#2#6#7'Caption'#6#8'M&ove up'#10'Glyph.Data'#10#154#1#0#0#150#1#0#0'BM'#150#1 + +#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#23#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '#1#0#0#0#0 + +#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128#0 + +#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#200#0#0#255#0#0 + +#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'wwwwwwwwwwwpwww' + +'wwwwwwwwpwwwwwwwwwwwpwwwx'#0#0#0#8'wwwpwwwp'#153#153#153#159'wwwpwwwp'#153 + +#153#153#159'wwwpwwwp'#153#153#153#159'wwwpwwwp'#153#153#153#159'wwwpwwwp' + +#153#153#153#159'wwwpwwwp'#153#153#153#159'wwwpx'#0#0#0#153#153#153#152#136 + +#136#143'pw'#9#153#153#153#153#153#153#153#153#247'pwp'#153#153#153#153#153 + +#153#153#159'wpww'#9#153#153#153#153#153#153#247'wpwwp'#153#153#153#153#153 + +#159'wwpwww'#9#153#153#153#153#247'wwpwwwp'#153#153#153#159'wwwpwwww'#9#153 + +#153#247'wwwpwwwwp'#153#159'wwwwpwwwww'#9#247'wwwwpwwwwwwwwwwpwwwwwwwwwwwpw' + +'wwwwwwwwwwpwwwwwwwwwwwp'#9'NumGlyphs'#2#0#7'OnClick'#7#10'UpBtnClick'#8'Tab' + +'Order'#2#3#0#0#7'TBitBtn'#7'DownBtn'#22'AnchorSideLeft.Control'#7#6'AddBtn' + +#21'AnchorSideTop.Control'#7#5'UpBtn'#18'AnchorSideTop.Side'#7#9'asrBottom' + +#23'AnchorSideRight.Control'#7#6'AddBtn'#20'AnchorSideRight.Side'#7#9'asrBot' + +'tom'#4'Left'#3#197#0#6'Height'#2'$'#3'Top'#3#154#0#5'Width'#3#149#0#7'Ancho' + ,'rs'#11#5'akTop'#6'akLeft'#7'akRight'#0#8'AutoSize'#9#17'BorderSpacing.Top'#2 + +#6#7'Caption'#6#10'&Move down'#10'Glyph.Data'#10#154#1#0#0#150#1#0#0'BM'#150 + +#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#23#0#0#0#24#0#0#0#1#0#4#0#0#0#0#0' '#1#0#0#0 + +#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0#0#0#128#0#0#128#0#0#0#128#128#0#128 + +#0#0#0#128#0#128#0#128#128#0#0#192#192#192#0#128#128#128#0#0#0#200#0#0#255#0 + +#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255#255#0'wwwwwwwwwwwpw' + +'wwwwwwwwwwpwwwwwwwwwwwpwwwwwwwwwwpwwwww'#9#247'wwwwpwwwwp'#153#159'wwwwpww' + +'ww'#9#153#153#247'wwwpwwwp'#153#153#153#159'wwwpwww'#9#153#153#153#153#247 + +'wwpwwp'#153#153#153#153#153#159'wwpww'#9#153#153#153#153#153#153#247'wpwp' + +#153#153#153#153#153#153#153#159'wpw'#9#153#153#153#153#153#153#153#153#247 + +'px'#0#0#0#153#153#153#152#136#136#143'pwwwp'#153#153#153#159'wwwpwwwp'#153 + +#153#153#159'wwwpwwwp'#153#153#153#159'wwwpwwwp'#153#153#153#159'wwwpwwwp' + +#153#153#153#159'wwwpwwwp'#153#153#153#159'wwwpwwwx'#0#0#0#8'wwwpwwwwwwwwwww' + +'pwwwwwwwwwwwpwwwwwwwwwwwp'#9'NumGlyphs'#2#0#7'OnClick'#7#12'DownBtnClick'#8 + +'TabOrder'#2#4#0#0#9'TComboBox'#9'ComboBox1'#22'AnchorSideLeft.Control'#7#6 + +'Label4'#19'AnchorSideLeft.Side'#7#9'asrBottom'#23'AnchorSideRight.Control'#7 + +#5'Owner'#20'AnchorSideRight.Side'#7#9'asrBottom'#24'AnchorSideBottom.Contro' + +'l'#7#12'ButtonPanel1'#4'Left'#3#128#0#6'Height'#2#31#3'Top'#3#252#0#5'Width' + +#3#193#1#7'Anchors'#11#6'akLeft'#7'akRight'#8'akBottom'#0#20'BorderSpacing.A' + +'round'#2#6#10'ItemHeight'#2#0#5'Style'#7#14'csDropDownList'#8'TabOrder'#2#5 + +#0#0#8'TListBox'#8'ListBox1'#22'AnchorSideLeft.Control'#7#5'Owner'#21'Anchor' + +'SideTop.Control'#7#6'Label1'#18'AnchorSideTop.Side'#7#9'asrBottom'#24'Ancho' + +'rSideBottom.Control'#7#9'ComboBox1'#4'Left'#2#6#6'Height'#3#216#0#3'Top'#2 + +#30#5'Width'#3#185#0#7'Anchors'#11#5'akTop'#6'akLeft'#8'akBottom'#0#20'Borde' + +'rSpacing.Around'#2#6#10'ItemHeight'#2#0#10'OnDblClick'#7#16'ListBox1DblClic' + +'k'#8'TabOrder'#2#6#8'TopIndex'#2#255#0#0#7'TBitBtn'#6'AddBtn'#22'AnchorSide' + +'Left.Control'#7#8'ListBox1'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'Ancho' + +'rSideTop.Control'#7#8'ListBox1'#4'Left'#3#197#0#6'Height'#2'#'#3'Top'#2#30#5 + +'Width'#3#149#0#8'AutoSize'#9#7'Caption'#6#18'&Add field to sort'#10'Glyph.D' + +'ata'#10#142#1#0#0#138#1#0#0'BM'#138#1#0#0#0#0#0#0'v'#0#0#0'('#0#0#0#24#0#0#0 + +#23#0#0#0#1#0#4#0#0#0#0#0#20#1#0#0#0#0#0#0#0#0#0#0#16#0#0#0#16#0#0#0#0#0#0#0 + +#0#0#128#0#0#128#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#192#192 + +#192#0#128#128#128#0#0#0#200#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0 + +#255#255#0#0#255#255#255#0'wwwwwwwwwwwwwwwwwwxwwwwwwwwwww'#0'wwwwwwwwwwp'#144 + +'wwwwwwwwww'#9#144'wwwwwwwwwp'#153#144'wwwwwwwww'#9#153#144'wwwwwwwwp'#153 + +#153#144#0#0#0#135'wwww'#9#153#153#153#153#153#153#7'wwwp'#153#153#153#153 + +#153#153#153#7'www'#9#153#153#153#153#153#153#153#7'ww'#153#153#153#153#153 + +#153#153#153#7'www'#249#153#153#153#153#153#153#153#7'www'#153#153#153#153 + +#153#153#153#7'wwww'#249#153#153#153#153#153#153#7'wwww'#153#153#152#255#255 + +#255#135'wwwww'#249#153#152'wwwwwwwww'#153#152'wwwwwwwwww'#249#152'wwwwwwww' + +'ww'#152'wwwwwwwwwww'#248'wwwwwwwwwwwwwwwwwwwwwwwwwwww'#9'NumGlyphs'#2#0#7 + +'OnClick'#7#11'AddBtnClick'#8'TabOrder'#2#1#0#0#12'TButtonPanel'#12'ButtonPa' + +'nel1'#4'Left'#2#6#6'Height'#2'*'#3'Top'#3'!'#1#5'Width'#3';'#2#8'TabOrder'#2 + +#7#11'ShowButtons'#11#4'pbOK'#8'pbCancel'#6'pbHelp'#0#0#0#0 +]); diff --git a/components/rx/rxsortby.lrt b/components/rx/rxsortby.lrt new file mode 100644 index 000000000..2f77b671d --- /dev/null +++ b/components/rx/rxsortby.lrt @@ -0,0 +1,10 @@ +TRXSORTBYFORM.CAPTION=rxSortByForm +TRXSORTBYFORM.LABEL1.CAPTION=&Orden de Ordenamiento : +TRXSORTBYFORM.LABEL2.CAPTION=&Campos Disponibles : +TRXSORTBYFORM.LABEL4.CAPTION=Seleccionar Dirección de Ordenamiento : +TRXSORTBYFORM.REMOVEBTN.CAPTION=&Eliminar +TRXSORTBYFORM.UPBTN.CAPTION=A&rriba +TRXSORTBYFORM.DOWNBTN.CAPTION=A&bajo +TRXSORTBYFORM.OKBUTTON.CAPTION=Aceptar +TRXSORTBYFORM.CANCELBUTTON.CAPTION=Cancelar +TRXSORTBYFORM.ADDBTN.CAPTION=&Adicionar diff --git a/components/rx/rxsortby.pas b/components/rx/rxsortby.pas new file mode 100644 index 000000000..f559b5433 --- /dev/null +++ b/components/rx/rxsortby.pas @@ -0,0 +1,190 @@ +unit rxsortby; + +{$mode objfpc}{$H+} + +interface + +uses + Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs, + StdCtrls, Buttons, ButtonPanel, db; + +type + + { TrxSortByForm } + + TrxSortByForm = class(TForm) + AddBtn: TBitBtn; + ButtonPanel1: TButtonPanel; + ComboBox1: TComboBox; + DownBtn: TBitBtn; + Label1: TLabel; + Label2: TLabel; + Label4: TLabel; + ListBox1: TListBox; + ListBox2: TListBox; + RemoveBtn: TBitBtn; + UpBtn: TBitBtn; + procedure AddBtnClick(Sender: TObject); + procedure DownBtnClick(Sender: TObject); + procedure FormClose(Sender: TObject; var CloseAction: TCloseAction); + procedure FormCreate(Sender: TObject); + procedure ListBox1DblClick(Sender: TObject); + procedure ListBox2DblClick(Sender: TObject); + procedure RemoveBtnClick(Sender: TObject); + procedure UpBtnClick(Sender: TObject); + private + OrderListTemp: TStringList; + OrderAsc:boolean; + public + { public declarations } + function Execute(adoTable : TDataSet; SortFieldNames:TStringList; var Asc:boolean):Boolean; + end; + +var + rxSortByForm: TrxSortByForm; + +implementation +uses rxdconst; + +{ TrxSortByForm } + +procedure TrxSortByForm.DownBtnClick(Sender: TObject); +var + TmpField:String; + Poz : Integer; +begin + if ListBox1.ItemIndex < ListBox1.Items.Count-1 Then + begin + Poz:=ListBox1.ItemIndex; + TmpField:=ListBox1.Items[Poz+1]; + ListBox1.Items[Poz+1]:=ListBox1.Items[Poz]; + ListBox1.Items[Poz]:=TmpField; + ListBox1.ItemIndex:=Poz+1; + end; +end; + +procedure TrxSortByForm.FormClose(Sender: TObject; var CloseAction: TCloseAction + ); +var + X:Integer; +begin + if ModalResult = mrOk then + begin + OrderAsc:=(ComboBox1.ItemIndex=0); + OrderListTemp.Clear; + for X:=0 To ListBox1.Items.Count-1 do + OrderListTemp.Add(ListBox1.Items[X]); + end; +end; + +procedure TrxSortByForm.FormCreate(Sender: TObject); +begin + ComboBox1.Clear; + ComboBox1.Items.Add(sRxAscendign); + ComboBox1.Items.Add(sRxDescending); + Caption:=sRxSortByFormCaption; + Label2.Caption:=sRxSortByFormAllFields; + Label1.Caption:=sRxSortByFormSortFields; + Label4.Caption:=sRxSortByFormSortOrder; + AddBtn.Caption:=sRxSortByFormAddField; + RemoveBtn.Caption:=sRxSortByFormRemoveField; + UpBtn.Caption:=sRxSortByFormMoveUpField; + DownBtn.Caption:=sRxSortByFormMoveDnField; +end; + +procedure TrxSortByForm.ListBox1DblClick(Sender: TObject); +begin + RemoveBtn.Click; +end; + + +procedure TrxSortByForm.ListBox2DblClick(Sender: TObject); +begin + AddBtn.Click; +end; + + +procedure TrxSortByForm.AddBtnClick(Sender: TObject); +begin + if ListBox2.ItemIndex <> -1 Then + begin + ListBox1.Items.Add(ListBox2.Items.Strings[ListBox2.ItemIndex]); + ListBox2.Items.Delete(ListBox2.ItemIndex); + ListBox1.ItemIndex:=ListBox1.Items.Count-1; + end; +end; + +procedure TrxSortByForm.RemoveBtnClick(Sender: TObject); +begin + if ListBox1.ItemIndex <> -1 Then + begin + ListBox2.Items.Add(ListBox1.Items.Strings[ListBox1.ItemIndex]); + ListBox1.Items.Delete(ListBox1.ItemIndex); + end; +end; + +procedure TrxSortByForm.UpBtnClick(Sender: TObject); +var + TmpField:String; + Poz : Integer; +begin + if ListBox1.ItemIndex > 0 Then + begin + Poz:=ListBox1.ItemIndex; + TmpField:=ListBox1.Items[Poz-1]; + ListBox1.Items[Poz-1]:=ListBox1.Items[Poz]; + ListBox1.Items[Poz]:=TmpField; + ListBox1.ItemIndex:=Poz-1; + end; +end; + + +function TrxSortByForm.Execute(adoTable : TDataSet; SortFieldNames: TStringList; var Asc:boolean): Boolean; +var + X,P : Integer; + S : String; + SortFieldNamesTmp : TStringList; +begin + Result:=False; + if not Asc then + ComboBox1.ItemIndex:=1 + else + ComboBox1.ItemIndex:=0; + SortFieldNamesTmp:=TStringList.Create; + for X:=0 to adoTable.FieldDefs.Count-1 do +// If (NOT adoTable.FieldDefs[X].FieldClass.IsBlob) Then + SortFieldNamesTmp.Add(adoTable.FieldDefs.Items[X].Name); + if SortFieldNames.Count > 0 Then + begin + ListBox1.Clear; + for X:=0 To SortFieldNames.Count-1 Do + begin + S:=SortFieldNames.Strings[X]; + ListBox1.Items.Add(S); + P:=SortFieldNamesTmp.IndexOF(SortFieldNames.Strings[X]); + if P > -1 then + SortFieldNamesTmp.Delete(P); + end; + end; + if SortFieldNamesTmp.Count > 0 then + begin + ListBox2.Clear; + for X:=0 To SortFieldNamesTmp.Count-1 do + ListBox2.Items.Add(SortFieldNamesTmp.Strings[X]); + end; + SortFieldNamesTmp.Free; + + OrderListTemp:=SortFieldNames; + OrderAsc:=Asc; + if ShowModal = mrOK Then + begin + Asc:=OrderAsc; + Result:=True; + end; +end; + +initialization + {$I rxsortby.lrs} + +end. + diff --git a/components/rx/rxtoolbar.pas b/components/rx/rxtoolbar.pas index 279e542a0..144150aed 100644 --- a/components/rx/rxtoolbar.pas +++ b/components/rx/rxtoolbar.pas @@ -563,7 +563,7 @@ begin end else begin - Canvas.Font.Color := clBtnText; + Canvas.Font.Color := clWindowText; if ((FLastDrawFlagsA and DFCS_FLAT) <> 0) and ((FLastDrawFlagsA and DFCS_PUSHED) = 0) and (TToolPanel(Parent).FToolBarStyle <> tbsWindowsXP) and (tpCaptionPopup in TToolbarItems(FOwnerItem.Collection).FToolPanel.Options) then OffsetRect(PaintRect, -2, -2); diff --git a/components/rx/tooledit.pas b/components/rx/tooledit.pas index b5ffc6406..c5257dfa8 100644 --- a/components/rx/tooledit.pas +++ b/components/rx/tooledit.pas @@ -180,7 +180,7 @@ function PaintComboEdit(Editor: TCustomMaskEdit; const AText: string; function EditorTextMargins(Editor: TCustomMaskEdit): TPoint; implementation -uses lclintf, LCLStrConsts, rxconst, rxstrutils, LResources, Forms; +uses lclintf, LCLStrConsts, rxconst, rxstrutils, LResources, Forms, LCLProc; type TPopupCalendarAccess = class(TPopupCalendar) @@ -398,7 +398,9 @@ begin csPopup: begin if FPopup = nil then + begin FPopup := CreatePopupCalendar(Self{$IFDEF USED_BiDi}, BiDiMode {$ENDIF}); + end; FPopup.OnCloseUp := @PopupCloseUp; FPopup.Color := FPopupColor; TRxCalendarGrid(FPopup.Calendar).NotInThisMonthColor:=FNotInThisMonthColor; @@ -461,6 +463,7 @@ procedure TCustomRxDateEdit.SetYearDigits(const AValue: TYearDigits); begin if FYearDigits=AValue then exit; FYearDigits:=AValue; + UpdateFormat; end; procedure TCustomRxDateEdit.CalendarHintsChanged(Sender: TObject); @@ -507,7 +510,11 @@ end;} procedure TCustomRxDateEdit.UpdateFormat; begin - FDateFormat := DefDateFormat(FourDigitYear); + case YearDigits of + dyDefault:FDateFormat :=DefDateFormat(FourDigitYear); + dyFour:FDateFormat := DefDateFormat(true); + dyTwo:FDateFormat := DefDateFormat(false);//DefDateMask(FBlanksChar, false); + end; end; procedure TCustomRxDateEdit.UpdatePopup; @@ -807,7 +814,11 @@ end; function TCustomRxDateEdit.GetDateMask: string; begin - Result := DefDateMask(FBlanksChar, FourDigitYear); + case YearDigits of + dyDefault:Result :=DefDateMask(FBlanksChar, FourDigitYear); + dyFour:Result := DefDateMask(FBlanksChar, true); + dyTwo:Result := DefDateMask(FBlanksChar, false); + end; end; procedure TCustomRxDateEdit.UpdateMask; @@ -818,12 +829,12 @@ begin DateValue := GetDate; OldFormat := FDateFormat; UpdateFormat; -{ if (GetDateMask <> EditMask) or (OldFormat <> FDateFormat) then + if (GetDateMask <> EditMask) or (OldFormat <> FDateFormat) then begin { force update } EditMask := ''; EditMask := GetDateMask; - end;} + end; UpdatePopup; SetDate(DateValue); end;