You've already forked lazarus-ccr
RxFPC:realign filter form
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5843 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -3,7 +3,7 @@
|
||||
<ProjectSession>
|
||||
<Version Value="10"/>
|
||||
<BuildModes Active="Default"/>
|
||||
<Units Count="16">
|
||||
<Units Count="18">
|
||||
<Unit0>
|
||||
<Filename Value="project1.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -11,7 +11,7 @@
|
||||
<WindowIndex Value="-1"/>
|
||||
<TopLine Value="-1"/>
|
||||
<CursorPos X="-1" Y="-1"/>
|
||||
<UsageCount Value="31"/>
|
||||
<UsageCount Value="32"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
@ -20,10 +20,9 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="25"/>
|
||||
<CursorPos X="16" Y="51"/>
|
||||
<UsageCount Value="31"/>
|
||||
<UsageCount Value="32"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@ -35,9 +34,9 @@
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGrid_PopUpFilterUnit"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<TopLine Value="173"/>
|
||||
<CursorPos X="47" Y="184"/>
|
||||
<UsageCount Value="31"/>
|
||||
<TopLine Value="188"/>
|
||||
<CursorPos X="60" Y="188"/>
|
||||
<UsageCount Value="32"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit2>
|
||||
@ -51,15 +50,16 @@
|
||||
</Unit3>
|
||||
<Unit4>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="4296"/>
|
||||
<CursorPos X="25" Y="4305"/>
|
||||
<TopLine Value="4845"/>
|
||||
<CursorPos X="3" Y="4868"/>
|
||||
<UsageCount Value="15"/>
|
||||
<Bookmarks Count="4">
|
||||
<Item0 X="14" Y="6400" ID="3"/>
|
||||
<Item1 X="24" Y="5181" ID="4"/>
|
||||
<Item2 Y="5267" ID="1"/>
|
||||
<Item3 Y="4301" ID="2"/>
|
||||
<Item0 X="14" Y="6403" ID="3"/>
|
||||
<Item1 X="24" Y="5184" ID="4"/>
|
||||
<Item2 Y="4864" ID="1"/>
|
||||
<Item3 Y="4287" ID="2"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit4>
|
||||
@ -145,99 +145,145 @@
|
||||
<CursorPos Y="154"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit15>
|
||||
<Unit16>
|
||||
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/types.pp"/>
|
||||
<UnitName Value="Types"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="305"/>
|
||||
<CursorPos X="10" Y="322"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit16>
|
||||
<Unit17>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<TopLine Value="1257"/>
|
||||
<CursorPos X="15" Y="1235"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit17>
|
||||
</Units>
|
||||
<JumpHistory Count="23" HistoryIndex="22">
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="180" TopLine="163"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="759" Column="15" TopLine="745"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="166" TopLine="160"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4171" Column="3" TopLine="4198"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="168" Column="3" TopLine="160"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="658" Column="19" TopLine="632"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="167" TopLine="160"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="777" Column="34" TopLine="750"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="180" TopLine="159"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="2686" Column="24" TopLine="2658"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4310" Column="40" TopLine="4296"/>
|
||||
<Caret Line="4270" Column="25" TopLine="4242"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="167" TopLine="160"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4271" Column="24" TopLine="4243"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="212" TopLine="193"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4287" TopLine="4264"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="181" Column="7" TopLine="156"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4853" Column="25" TopLine="4836"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="81" Column="24" TopLine="66"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4856" Column="3" TopLine="4834"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="176" Column="30" TopLine="173"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4857" Column="3" TopLine="4839"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Caret Line="52" Column="3" TopLine="35"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4862" Column="7" TopLine="4839"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4861" Column="67" TopLine="4845"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Caret Line="99" Column="10" TopLine="69"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4852" TopLine="4845"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Caret Line="100" Column="14" TopLine="70"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4854" TopLine="4845"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Caret Line="116" Column="16" TopLine="86"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4856" TopLine="4845"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Caret Line="136" Column="12" TopLine="106"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4858" TopLine="4845"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Caret Line="138" Column="35" TopLine="107"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4862" Column="10" TopLine="4845"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Caret Line="145" Column="10" TopLine="110"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4852" TopLine="4845"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../rxdb/rxdbgrid_popupfilterunit.pas"/>
|
||||
<Caret Line="183" Column="6" TopLine="173"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4854" TopLine="4845"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../rxtools/rxdconst.pas"/>
|
||||
<Caret Line="139" Column="68" TopLine="125"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4856" TopLine="4845"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="52" Column="16" TopLine="26"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4858" TopLine="4845"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="51" Column="16" TopLine="25"/>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4860" TopLine="4845"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<Caret Line="1235" Column="15" TopLine="1219"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4860" TopLine="4845"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4285" Column="18" TopLine="4271"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4286" Column="9" TopLine="4282"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4864" TopLine="4847"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4852" TopLine="4845"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<Caret Line="4854" TopLine="4845"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
</CONFIG>
|
||||
|
@ -612,7 +612,7 @@ type
|
||||
TRxDBGrid = class(TCustomDBGrid)
|
||||
private
|
||||
FColumnDefValues: TRxDBGridColumnDefValues;
|
||||
//FrxDSState:TRxDSState;
|
||||
|
||||
FFooterOptions: TRxDBGridFooterOptions;
|
||||
FSearchOptions: TRxDBGridSearchOptions;
|
||||
FSortColumns: TRxDbGridColumnsSortList;
|
||||
@ -622,7 +622,6 @@ type
|
||||
FKeyStrokes: TRxDBGridKeyStrokes;
|
||||
FOnGetCellProps: TGetCellPropsEvent;
|
||||
FOptionsRx: TOptionsRx;
|
||||
// FTitleLines: Integer;
|
||||
|
||||
FOnGetBtnParams: TGetBtnParamsEvent;
|
||||
FOnFiltred: TNotifyEvent;
|
||||
@ -4810,36 +4809,25 @@ begin
|
||||
if (FFilterListEditor.Text = EmptyValue) then
|
||||
begin
|
||||
CurrentValues.Clear;
|
||||
{ Value := '';
|
||||
IsNull:=true;
|
||||
IsAll:=false;}
|
||||
State:=rxfsEmpty;
|
||||
end
|
||||
else
|
||||
if (FFilterListEditor.Text = AllValue) then
|
||||
begin
|
||||
CurrentValues.Clear;
|
||||
{ Value := '';
|
||||
IsNull:=false;
|
||||
IsAll:=true;}
|
||||
State:=rxfsAll;
|
||||
end
|
||||
else
|
||||
begin
|
||||
CurrentValues.Clear;
|
||||
CurrentValues.Add(FFilterListEditor.Text);
|
||||
{ Value := FFilterListEditor.Text;
|
||||
IsNull:=false;
|
||||
IsAll:=false;}
|
||||
State:=rxfsFilter;
|
||||
end;
|
||||
end;
|
||||
|
||||
// DataSource.DataSet.Refresh;
|
||||
DataSource.DataSet.DisableControls;
|
||||
DataSource.DataSet.Filtered:=false;
|
||||
DataSource.DataSet.Filtered:=true;
|
||||
// DataSource.DataSet.First;
|
||||
CalcStatTotals;
|
||||
DataSource.DataSet.EnableControls;
|
||||
|
||||
@ -4857,12 +4845,27 @@ end;
|
||||
procedure TRxDBGrid.FFilterColDlgButtonOnClick(Sender: TObject);
|
||||
var
|
||||
RxDBGrid_PopUpFilterForm: TRxDBGrid_PopUpFilterForm;
|
||||
R: TPoint;
|
||||
R, P: TPoint;
|
||||
FRxCol: TRxColumn;
|
||||
FRect: TRect;
|
||||
begin
|
||||
FRxCol:=TRxColumn(Columns[Columns.RealIndex(FFilterColDlgButton.Col)]);
|
||||
|
||||
RxDBGrid_PopUpFilterForm:=TRxDBGrid_PopUpFilterForm.CreatePopUpFilterForm(FRxCol);
|
||||
R:=ClientToScreen(Point(FFilterColDlgButton.Left, FFilterColDlgButton.Top + FFilterColDlgButton.Width));
|
||||
|
||||
|
||||
P:=Point(FFilterColDlgButton.Left, FFilterColDlgButton.Top + FFilterColDlgButton.Width);
|
||||
|
||||
|
||||
if RxDBGrid_PopUpFilterForm.Width < FRxCol.Width then
|
||||
P.X:=FFilterColDlgButton.Left + FFilterColDlgButton.Width - RxDBGrid_PopUpFilterForm.Width
|
||||
else
|
||||
P.X:=FFilterColDlgButton.Left + FFilterColDlgButton.Width - FRxCol.Width;
|
||||
|
||||
R:=ClientToScreen(P);
|
||||
if R.X + RxDBGrid_PopUpFilterForm.Width > Screen.Width then
|
||||
R.X:=Screen.Width - RxDBGrid_PopUpFilterForm.Width;
|
||||
|
||||
RxDBGrid_PopUpFilterForm.Left:=R.X;
|
||||
RxDBGrid_PopUpFilterForm.Top:=R.Y;
|
||||
RxDBGrid_PopUpFilterForm.ShowModal;
|
||||
|
Reference in New Issue
Block a user