You've already forked lazarus-ccr
RxFPC:fix RxDBGrid filter form
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6206 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -1,29 +1,6 @@
|
||||
2. TPageManager предназначен для построения мастеров
|
||||
умеет отображать в заголовке формы (если установлена соответсвующая опция)
|
||||
текст, который сформатирует из строк информациия (пропускается через функцию Format)
|
||||
строка информации может содержать в себе два целочисленных параметра (%d)
|
||||
первый - текущий шаг
|
||||
второй - всего шагов
|
||||
пример:
|
||||
'Мастер приёма. Шаг %d из %d.'
|
||||
|
||||
StatusControl - если установлен то в заголовке также отображается эта же
|
||||
информация.
|
||||
|
||||
событие OnCheckPageEnabled служит для указания, что конкретная страница
|
||||
запрещена при нажатии на кнопки Next и Prior эта страница пропускается
|
||||
|
||||
5. Замечание о RXDBGRID_OPTIONS_WO_CANCEL_ON_EXIT и флаге dgCancelOnExit в
|
||||
TRxDbGrid.Options
|
||||
в случае использования следующей схемы под линуксом:
|
||||
В форму ложим список TRxDbGrid с открытым набором данных и отдельную кнопку (TSpeedButton) на
|
||||
добавление новой записи в набор данных с вызовом другой модальной формы для редактирования
|
||||
добовляемых значение
|
||||
при открытии формы редактирования набор данных, связанный с TRxDbGrid переходит в состояние
|
||||
редактирования
|
||||
это поведени наблюдается только по Linux
|
||||
|
||||
объяснение заключается в том что при потере фокуса TDbGrid и его наследниеи вызывают
|
||||
метод Cancel
|
||||
1. Contributors
|
||||
brick08 - from freepascal.ru
|
||||
rtn - from freepascal.ru
|
||||
kit - from freepascal.ru
|
||||
|
||||
7. Вопросы задавать мылом или на форуме FreePascal.ru (предпочтительней)
|
||||
|
@ -9,14 +9,14 @@ object rxFilterByForm: TrxFilterByForm
|
||||
ClientWidth = 644
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.7'
|
||||
LCLVersion = '1.9.0.0'
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Owner
|
||||
AnchorSideTop.Control = Owner
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 6
|
||||
Width = 214
|
||||
Width = 212
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Select filter expression for data'
|
||||
Font.Style = [fsBold]
|
||||
@ -30,7 +30,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
Left = 6
|
||||
Height = 20
|
||||
Top = 32
|
||||
Width = 57
|
||||
Width = 58
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'On field:'
|
||||
Font.Color = clRed
|
||||
@ -44,7 +44,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
Left = 168
|
||||
Height = 20
|
||||
Top = 32
|
||||
Width = 75
|
||||
Width = 74
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Operation :'
|
||||
Font.Color = clRed
|
||||
@ -73,7 +73,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
Left = 533
|
||||
Height = 20
|
||||
Top = 32
|
||||
Width = 66
|
||||
Width = 65
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Operand :'
|
||||
Font.Color = clRed
|
||||
@ -143,7 +143,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 36
|
||||
Height = 32
|
||||
Top = 58
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
@ -214,7 +214,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 36
|
||||
Height = 32
|
||||
Top = 100
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
@ -285,7 +285,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 36
|
||||
Height = 32
|
||||
Top = 144
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
@ -356,7 +356,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 36
|
||||
Height = 32
|
||||
Top = 188
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
@ -427,7 +427,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 36
|
||||
Height = 32
|
||||
Top = 232
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
@ -498,7 +498,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 36
|
||||
Height = 32
|
||||
Top = 276
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
@ -569,7 +569,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 36
|
||||
Height = 32
|
||||
Top = 320
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
@ -640,7 +640,7 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Owner
|
||||
AnchorSideRight.Side = asrBottom
|
||||
Left = 527
|
||||
Height = 36
|
||||
Height = 32
|
||||
Top = 364
|
||||
Width = 111
|
||||
Anchors = [akTop, akRight]
|
||||
@ -710,8 +710,8 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 6
|
||||
Height = 36
|
||||
Top = 403
|
||||
Height = 32
|
||||
Top = 407
|
||||
Width = 58
|
||||
Anchors = [akLeft, akBottom]
|
||||
BorderSpacing.Around = 6
|
||||
@ -729,10 +729,10 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Side = asrBottom
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 585
|
||||
Left = 586
|
||||
Height = 36
|
||||
Top = 403
|
||||
Width = 53
|
||||
Width = 52
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -745,10 +745,10 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Button1
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 519
|
||||
Left = 521
|
||||
Height = 36
|
||||
Top = 403
|
||||
Width = 60
|
||||
Width = 59
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -761,10 +761,10 @@ object rxFilterByForm: TrxFilterByForm
|
||||
AnchorSideRight.Control = Button2
|
||||
AnchorSideBottom.Control = Owner
|
||||
AnchorSideBottom.Side = asrBottom
|
||||
Left = 429
|
||||
Left = 432
|
||||
Height = 36
|
||||
Top = 403
|
||||
Width = 84
|
||||
Width = 83
|
||||
Anchors = [akRight, akBottom]
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
|
@ -181,22 +181,33 @@ end;
|
||||
|
||||
procedure TrxFilterByForm.ClearALL(AGrid: TRxDBGrid);
|
||||
var
|
||||
i : Integer;
|
||||
i , wsb, w, wt: Integer;
|
||||
begin
|
||||
//*****************************************************************************
|
||||
Combo_1[1].Items.Clear;
|
||||
Combo_1[1].Items.Add('');
|
||||
|
||||
wsb:= 30; //ширина скроллбара
|
||||
w := Combo_1[1].Width - wsb;
|
||||
for i := 0 To AGrid.Columns.Count-1 do
|
||||
begin
|
||||
if Assigned(AGrid.Columns[i].Field) and (AGrid.Columns[i].Field.FieldKind=fkData) and (AGrid.Columns[i].Visible) then
|
||||
begin
|
||||
Combo_1[1].Items.Objects[Combo_1[1].Items.Add(AGrid.Columns[i].Title.Caption)]:=AGrid.Columns[i].Field;
|
||||
wt := Canvas.TextWidth(AGrid.Columns[i].Title.Caption);
|
||||
if wt > w then
|
||||
w := wt;
|
||||
end;
|
||||
end;
|
||||
|
||||
Combo_1[1].ItemIndex := 0;
|
||||
Combo_1[1].ItemWidth := w + wsb;
|
||||
|
||||
for i := 2 To 9 do
|
||||
begin
|
||||
Combo_1[i].Items.Assign(Combo_1[1].Items);
|
||||
Combo_1[i].ItemIndex := 0;
|
||||
Combo_1[i].ItemWidth := w + wsb;
|
||||
end;
|
||||
|
||||
Combo_2[1].Items.Clear;
|
||||
|
Reference in New Issue
Block a user