You've already forked lazarus-ccr
1. RxDBGrid - sort dialog allow make sort order for all fields
2. RxDBGrid - new procedure - ShowSortDialog 3. RxDBGrid - make multicolumn sort by tytle click with ctrl git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2529 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -54,15 +54,17 @@
|
|||||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||||
</Item4>
|
</Item4>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="77">
|
<Units Count="81">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="RxDBGridDemo.lpr"/>
|
<Filename Value="RxDBGridDemo.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="RxDBGridDemo"/>
|
<UnitName Value="RxDBGridDemo"/>
|
||||||
|
<EditorIndex Value="3"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="1"/>
|
||||||
<CursorPos X="9" Y="16"/>
|
<CursorPos X="9" Y="16"/>
|
||||||
<UsageCount Value="65"/>
|
<UsageCount Value="66"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit0>
|
</Unit0>
|
||||||
<Unit1>
|
<Unit1>
|
||||||
<Filename Value="rxdbgridmainunit.pas"/>
|
<Filename Value="rxdbgridmainunit.pas"/>
|
||||||
@ -73,9 +75,9 @@
|
|||||||
<UnitName Value="RxDBGridMainUnit"/>
|
<UnitName Value="RxDBGridMainUnit"/>
|
||||||
<EditorIndex Value="0"/>
|
<EditorIndex Value="0"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1"/>
|
<TopLine Value="67"/>
|
||||||
<CursorPos X="21" Y="18"/>
|
<CursorPos X="21" Y="18"/>
|
||||||
<UsageCount Value="65"/>
|
<UsageCount Value="66"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
<LoadedDesigner Value="True"/>
|
<LoadedDesigner Value="True"/>
|
||||||
</Unit1>
|
</Unit1>
|
||||||
@ -496,36 +498,38 @@
|
|||||||
<Unit58>
|
<Unit58>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<UnitName Value="rxdbgrid"/>
|
<UnitName Value="rxdbgrid"/>
|
||||||
<IsVisibleTab Value="True"/>
|
<EditorIndex Value="4"/>
|
||||||
<EditorIndex Value="1"/>
|
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1276"/>
|
<TopLine Value="167"/>
|
||||||
<CursorPos X="47" Y="1288"/>
|
<CursorPos X="15" Y="186"/>
|
||||||
<UsageCount Value="16"/>
|
<UsageCount Value="17"/>
|
||||||
<Bookmarks Count="3">
|
<Bookmarks Count="4">
|
||||||
<Item0 X="3" Y="73" ID="1"/>
|
<Item0 X="18" Y="3871" ID="1"/>
|
||||||
<Item1 X="13" Y="328" ID="2"/>
|
<Item1 X="1" Y="2184" ID="2"/>
|
||||||
<Item2 X="15" Y="572" ID="3"/>
|
<Item2 X="15" Y="633" ID="3"/>
|
||||||
|
<Item3 X="17" Y="3741" ID="4"/>
|
||||||
</Bookmarks>
|
</Bookmarks>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit58>
|
</Unit58>
|
||||||
<Unit59>
|
<Unit59>
|
||||||
<Filename Value="/usr/local/share/lazarus/lcl/dbgrids.pas"/>
|
<Filename Value="/usr/local/share/lazarus/lcl/dbgrids.pas"/>
|
||||||
<UnitName Value="DBGrids"/>
|
<UnitName Value="DBGrids"/>
|
||||||
<EditorIndex Value="2"/>
|
<EditorIndex Value="5"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="2414"/>
|
<TopLine Value="401"/>
|
||||||
<CursorPos X="1" Y="2437"/>
|
<CursorPos X="15" Y="420"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="11"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit59>
|
</Unit59>
|
||||||
<Unit60>
|
<Unit60>
|
||||||
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
<Filename Value="/usr/local/share/lazarus/lcl/grids.pas"/>
|
||||||
<UnitName Value="Grids"/>
|
<UnitName Value="Grids"/>
|
||||||
|
<EditorIndex Value="6"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="7494"/>
|
<TopLine Value="11347"/>
|
||||||
<CursorPos X="34" Y="7503"/>
|
<CursorPos X="3" Y="11349"/>
|
||||||
<UsageCount Value="10"/>
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit60>
|
</Unit60>
|
||||||
<Unit61>
|
<Unit61>
|
||||||
<Filename Value="../../../../../../install/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
<Filename Value="../../../../../../install/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||||
@ -611,10 +615,12 @@
|
|||||||
</Unit70>
|
</Unit70>
|
||||||
<Unit71>
|
<Unit71>
|
||||||
<Filename Value="../../../../../../install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
<Filename Value="../../../../../../install/source/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||||
|
<EditorIndex Value="7"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="645"/>
|
<TopLine Value="255"/>
|
||||||
<CursorPos X="15" Y="666"/>
|
<CursorPos X="15" Y="271"/>
|
||||||
<UsageCount Value="9"/>
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
</Unit71>
|
</Unit71>
|
||||||
<Unit72>
|
<Unit72>
|
||||||
<Filename Value="../../../../../../install/source/fpcsrc/rtl/objpas/classes/stringl.inc"/>
|
<Filename Value="../../../../../../install/source/fpcsrc/rtl/objpas/classes/stringl.inc"/>
|
||||||
@ -634,154 +640,193 @@
|
|||||||
<Unit74>
|
<Unit74>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxlookup.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxlookup.pas"/>
|
||||||
<UnitName Value="rxlookup"/>
|
<UnitName Value="rxlookup"/>
|
||||||
<EditorIndex Value="4"/>
|
<EditorIndex Value="11"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1176"/>
|
<TopLine Value="1176"/>
|
||||||
<CursorPos X="3" Y="1196"/>
|
<CursorPos X="3" Y="1196"/>
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit74>
|
</Unit74>
|
||||||
<Unit75>
|
<Unit75>
|
||||||
<Filename Value="../../../../../../install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
|
<Filename Value="../../../../../../install/source/fpcsrc/packages/fcl-db/src/base/db.pas"/>
|
||||||
<UnitName Value="db"/>
|
<UnitName Value="db"/>
|
||||||
<EditorIndex Value="3"/>
|
<EditorIndex Value="10"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="1776"/>
|
<TopLine Value="1776"/>
|
||||||
<CursorPos X="14" Y="1796"/>
|
<CursorPos X="14" Y="1796"/>
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit75>
|
</Unit75>
|
||||||
<Unit76>
|
<Unit76>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxpopupunit.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxpopupunit.pas"/>
|
||||||
<UnitName Value="rxpopupunit"/>
|
<UnitName Value="rxpopupunit"/>
|
||||||
<EditorIndex Value="5"/>
|
<EditorIndex Value="12"/>
|
||||||
<WindowIndex Value="0"/>
|
<WindowIndex Value="0"/>
|
||||||
<TopLine Value="275"/>
|
<TopLine Value="275"/>
|
||||||
<CursorPos X="1" Y="298"/>
|
<CursorPos X="1" Y="298"/>
|
||||||
<UsageCount Value="13"/>
|
<UsageCount Value="14"/>
|
||||||
<Loaded Value="True"/>
|
<Loaded Value="True"/>
|
||||||
</Unit76>
|
</Unit76>
|
||||||
|
<Unit77>
|
||||||
|
<Filename Value="../../../../../../install/source/fpcsrc/rtl/objpas/classes/collect.inc"/>
|
||||||
|
<EditorIndex Value="9"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="397"/>
|
||||||
|
<CursorPos X="3" Y="399"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit77>
|
||||||
|
<Unit78>
|
||||||
|
<Filename Value="../../../../../../install/source/fpcsrc/rtl/objpas/classes/lists.inc"/>
|
||||||
|
<EditorIndex Value="8"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="131"/>
|
||||||
|
<CursorPos X="3" Y="133"/>
|
||||||
|
<UsageCount Value="11"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit78>
|
||||||
|
<Unit79>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxsortmemds.pas"/>
|
||||||
|
<UnitName Value="rxsortmemds"/>
|
||||||
|
<EditorIndex Value="1"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="34"/>
|
||||||
|
<CursorPos X="1" Y="1"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit79>
|
||||||
|
<Unit80>
|
||||||
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxmemds.pas"/>
|
||||||
|
<UnitName Value="rxmemds"/>
|
||||||
|
<IsVisibleTab Value="True"/>
|
||||||
|
<EditorIndex Value="2"/>
|
||||||
|
<WindowIndex Value="0"/>
|
||||||
|
<TopLine Value="144"/>
|
||||||
|
<CursorPos X="15" Y="164"/>
|
||||||
|
<UsageCount Value="10"/>
|
||||||
|
<Loaded Value="True"/>
|
||||||
|
</Unit80>
|
||||||
</Units>
|
</Units>
|
||||||
<JumpHistory Count="30" HistoryIndex="29">
|
<JumpHistory Count="30" HistoryIndex="29">
|
||||||
<Position1>
|
<Position1>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1302" Column="1" TopLine="1281"/>
|
<Caret Line="453" Column="30" TopLine="441"/>
|
||||||
</Position1>
|
</Position1>
|
||||||
<Position2>
|
<Position2>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1281"/>
|
<Caret Line="629" Column="44" TopLine="610"/>
|
||||||
</Position2>
|
</Position2>
|
||||||
<Position3>
|
<Position3>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1298" Column="1" TopLine="1281"/>
|
<Caret Line="1590" Column="3" TopLine="1586"/>
|
||||||
</Position3>
|
</Position3>
|
||||||
<Position4>
|
<Position4>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3040" Column="1" TopLine="3019"/>
|
<Caret Line="1519" Column="23" TopLine="1495"/>
|
||||||
</Position4>
|
</Position4>
|
||||||
<Position5>
|
<Position5>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3019"/>
|
<Caret Line="436" Column="5" TopLine="415"/>
|
||||||
</Position5>
|
</Position5>
|
||||||
<Position6>
|
<Position6>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="409" Column="1" TopLine="383"/>
|
||||||
</Position6>
|
</Position6>
|
||||||
<Position7>
|
<Position7>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1298" Column="1" TopLine="1276"/>
|
<Caret Line="849" Column="19" TopLine="847"/>
|
||||||
</Position7>
|
</Position7>
|
||||||
<Position8>
|
<Position8>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3040" Column="1" TopLine="3019"/>
|
<Caret Line="848" Column="1" TopLine="847"/>
|
||||||
</Position8>
|
</Position8>
|
||||||
<Position9>
|
<Position9>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3019"/>
|
<Caret Line="410" Column="74" TopLine="402"/>
|
||||||
</Position9>
|
</Position9>
|
||||||
<Position10>
|
<Position10>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="1585" Column="38" TopLine="1564"/>
|
||||||
</Position10>
|
</Position10>
|
||||||
<Position11>
|
<Position11>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1298" Column="1" TopLine="1276"/>
|
<Caret Line="632" Column="15" TopLine="613"/>
|
||||||
</Position11>
|
</Position11>
|
||||||
<Position12>
|
<Position12>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3040" Column="1" TopLine="3019"/>
|
<Caret Line="1593" Column="38" TopLine="1581"/>
|
||||||
</Position12>
|
</Position12>
|
||||||
<Position13>
|
<Position13>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3019"/>
|
<Caret Line="2069" Column="15" TopLine="2048"/>
|
||||||
</Position13>
|
</Position13>
|
||||||
<Position14>
|
<Position14>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="437" Column="5" TopLine="416"/>
|
||||||
</Position14>
|
</Position14>
|
||||||
<Position15>
|
<Position15>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3020"/>
|
<Caret Line="407" Column="1" TopLine="383"/>
|
||||||
</Position15>
|
</Position15>
|
||||||
<Position16>
|
<Position16>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="2078" Column="2" TopLine="2047"/>
|
||||||
</Position16>
|
</Position16>
|
||||||
<Position17>
|
<Position17>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3020"/>
|
<Caret Line="2114" Column="83" TopLine="2095"/>
|
||||||
</Position17>
|
</Position17>
|
||||||
<Position18>
|
<Position18>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="2126" Column="12" TopLine="2111"/>
|
||||||
</Position18>
|
</Position18>
|
||||||
<Position19>
|
<Position19>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3020"/>
|
<Caret Line="2127" Column="10" TopLine="2109"/>
|
||||||
</Position19>
|
</Position19>
|
||||||
<Position20>
|
<Position20>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="2227" Column="49" TopLine="2203"/>
|
||||||
</Position20>
|
</Position20>
|
||||||
<Position21>
|
<Position21>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3020"/>
|
<Caret Line="2226" Column="1" TopLine="2203"/>
|
||||||
</Position21>
|
</Position21>
|
||||||
<Position22>
|
<Position22>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="538" Column="36" TopLine="522"/>
|
||||||
</Position22>
|
</Position22>
|
||||||
<Position23>
|
<Position23>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3020"/>
|
<Caret Line="2163" Column="3" TopLine="2139"/>
|
||||||
</Position23>
|
</Position23>
|
||||||
<Position24>
|
<Position24>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="2181" Column="38" TopLine="2160"/>
|
||||||
</Position24>
|
</Position24>
|
||||||
<Position25>
|
<Position25>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3020"/>
|
<Caret Line="2563" Column="2" TopLine="2534"/>
|
||||||
</Position25>
|
</Position25>
|
||||||
<Position26>
|
<Position26>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="472" Column="7" TopLine="453"/>
|
||||||
</Position26>
|
</Position26>
|
||||||
<Position27>
|
<Position27>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3020"/>
|
<Caret Line="2564" Column="2" TopLine="2544"/>
|
||||||
</Position27>
|
</Position27>
|
||||||
<Position28>
|
<Position28>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
||||||
<Caret Line="1297" Column="1" TopLine="1276"/>
|
<Caret Line="2724" Column="22" TopLine="2689"/>
|
||||||
</Position28>
|
</Position28>
|
||||||
<Position29>
|
<Position29>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="rxdbgridmainunit.pas"/>
|
||||||
<Caret Line="3041" Column="1" TopLine="3020"/>
|
<Caret Line="18" Column="21" TopLine="67"/>
|
||||||
</Position29>
|
</Position29>
|
||||||
<Position30>
|
<Position30>
|
||||||
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxdbgrid.pas"/>
|
<Filename Value="/usr/local/share/lazarus/components/rxnew/rxsortmemds.pas"/>
|
||||||
<Caret Line="3042" Column="1" TopLine="3020"/>
|
<Caret Line="1" Column="1" TopLine="34"/>
|
||||||
</Position30>
|
</Position30>
|
||||||
</JumpHistory>
|
</JumpHistory>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
|
@ -50,7 +50,7 @@ type
|
|||||||
TFBDataSetSortEngine = class(TRxDBGridSortEngine)
|
TFBDataSetSortEngine = class(TRxDBGridSortEngine)
|
||||||
public
|
public
|
||||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||||
procedure SortList(ListField:string; ADataSet:TDataSet; Asc:boolean);override;
|
procedure SortList(ListField:string; ADataSet:TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -64,7 +64,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TFBDataSetSortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
procedure TFBDataSetSortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
||||||
Asc: boolean);
|
Asc: array of boolean; SortOptions: TRxSortEngineOptions);
|
||||||
begin
|
begin
|
||||||
if Assigned(ADataSet) then
|
if Assigned(ADataSet) then
|
||||||
(ADataSet as TFBDataSet).SortOnFields(ListField, Asc);
|
(ADataSet as TFBDataSet).SortOnFields(ListField, Asc);
|
||||||
|
@ -183,9 +183,8 @@ type
|
|||||||
private
|
private
|
||||||
FDataSetClass: TDataSetClass;
|
FDataSetClass: TDataSetClass;
|
||||||
public
|
public
|
||||||
procedure Sort(Field: TField; ADataSet: TDataSet; Asc: boolean;
|
procedure Sort(Field: TField; ADataSet: TDataSet; Asc: boolean; SortOptions: TRxSortEngineOptions); virtual; abstract;
|
||||||
SortOptions: TRxSortEngineOptions); virtual; abstract;
|
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions); virtual;
|
||||||
procedure SortList(ListField: string; ADataSet: TDataSet; Asc: boolean); virtual;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
TRxDBGridSortEngineClass = class of TRxDBGridSortEngine;
|
TRxDBGridSortEngineClass = class of TRxDBGridSortEngine;
|
||||||
@ -363,6 +362,8 @@ type
|
|||||||
FKeyList: TStrings;
|
FKeyList: TStrings;
|
||||||
FNotInKeyListIndex: integer;
|
FNotInKeyListIndex: integer;
|
||||||
FOnDrawColumnCell: TDrawColumnCellEvent;
|
FOnDrawColumnCell: TDrawColumnCellEvent;
|
||||||
|
FSortOrder: TSortMarker;
|
||||||
|
FSortPosition: integer;
|
||||||
function GetFooter: TRxColumnFooter;
|
function GetFooter: TRxColumnFooter;
|
||||||
function GetKeyList: TStrings;
|
function GetKeyList: TStrings;
|
||||||
procedure SetEditButtons(AValue: TRxColumnEditButtons);
|
procedure SetEditButtons(AValue: TRxColumnEditButtons);
|
||||||
@ -377,6 +378,8 @@ type
|
|||||||
constructor Create(ACollection: TCollection); override;
|
constructor Create(ACollection: TCollection); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
procedure OptimizeWidth;
|
procedure OptimizeWidth;
|
||||||
|
property SortOrder: TSortMarker read FSortOrder;
|
||||||
|
property SortPosition: integer read FSortPosition;
|
||||||
published
|
published
|
||||||
property Footer: TRxColumnFooter read GetFooter write SetFooter;
|
property Footer: TRxColumnFooter read GetFooter write SetFooter;
|
||||||
property ImageList: TImageList read FImageList write SetImageList;
|
property ImageList: TImageList read FImageList write SetImageList;
|
||||||
@ -392,10 +395,20 @@ type
|
|||||||
{ TRxDbGridColumns }
|
{ TRxDbGridColumns }
|
||||||
TRxDbGridColumns = class(TDbGridColumns)
|
TRxDbGridColumns = class(TDbGridColumns)
|
||||||
protected
|
protected
|
||||||
|
procedure Notify(Item: TCollectionItem;Action: TCollectionNotification); override;
|
||||||
public
|
public
|
||||||
function Add: TRxColumn;
|
function Add: TRxColumn;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TRxDbGridColumnsSortList }
|
||||||
|
|
||||||
|
TRxDbGridColumnsSortList = class(TFPList)
|
||||||
|
private
|
||||||
|
function GetCollumn(Index: Integer): TRxColumn;
|
||||||
|
public
|
||||||
|
property Collumn[Index: Integer]: TRxColumn read GetCollumn; default;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TFilterListCellEditor }
|
{ TFilterListCellEditor }
|
||||||
|
|
||||||
TFilterListCellEditor = class(TComboBox)
|
TFilterListCellEditor = class(TComboBox)
|
||||||
@ -420,6 +433,7 @@ type
|
|||||||
private
|
private
|
||||||
FrxDSState:TRxDSState;
|
FrxDSState:TRxDSState;
|
||||||
FFooterOptions: TRxDBGridFooterOptions;
|
FFooterOptions: TRxDBGridFooterOptions;
|
||||||
|
FSortColumns: TRxDbGridColumnsSortList;
|
||||||
FSortingNow:Boolean;
|
FSortingNow:Boolean;
|
||||||
FInProcessCalc: integer;
|
FInProcessCalc: integer;
|
||||||
FAllowedOperations: TRxDBGridAllowedOperations;
|
FAllowedOperations: TRxDBGridAllowedOperations;
|
||||||
@ -428,15 +442,16 @@ type
|
|||||||
FOnGetCellProps: TGetCellPropsEvent;
|
FOnGetCellProps: TGetCellPropsEvent;
|
||||||
FOptionsRx: TOptionsRx;
|
FOptionsRx: TOptionsRx;
|
||||||
// FTitleLines: Integer;
|
// FTitleLines: Integer;
|
||||||
FAutoSort: boolean;
|
|
||||||
FMarkerUp, FMarkerDown: TBitmap;
|
|
||||||
FOnGetBtnParams: TGetBtnParamsEvent;
|
FOnGetBtnParams: TGetBtnParamsEvent;
|
||||||
FOnFiltred: TNotifyEvent;
|
FOnFiltred: TNotifyEvent;
|
||||||
//auto sort support
|
//auto sort support
|
||||||
FSortField: TField;
|
|
||||||
FSortOrder: TSortMarker;
|
FMarkerUp : TBitmap;
|
||||||
FSortEngine: TRxDBGridSortEngine;
|
FMarkerDown : TBitmap;
|
||||||
FPressedCol: TColumn;
|
FAutoSort : boolean;
|
||||||
|
FSortEngine : TRxDBGridSortEngine;
|
||||||
|
FPressedCol : TRxColumn;
|
||||||
//
|
//
|
||||||
FPressed: boolean;
|
FPressed: boolean;
|
||||||
FSwapButtons: boolean;
|
FSwapButtons: boolean;
|
||||||
@ -453,7 +468,7 @@ type
|
|||||||
F_EventOnDeleteError: TDataSetErrorEvent;
|
F_EventOnDeleteError: TDataSetErrorEvent;
|
||||||
F_EventOnPostError: TDataSetErrorEvent;
|
F_EventOnPostError: TDataSetErrorEvent;
|
||||||
F_LastFilter: TStringList;
|
F_LastFilter: TStringList;
|
||||||
F_SortListField: TStringList;
|
//F_SortListField: TStringList;
|
||||||
F_CreateLookup: TCreateLookup;
|
F_CreateLookup: TCreateLookup;
|
||||||
F_DisplayLookup: TDisplayLookup;
|
F_DisplayLookup: TDisplayLookup;
|
||||||
|
|
||||||
@ -478,8 +493,11 @@ type
|
|||||||
function GetColumns: TRxDbGridColumns;
|
function GetColumns: TRxDbGridColumns;
|
||||||
function GetFooterColor: TColor;
|
function GetFooterColor: TColor;
|
||||||
function GetFooterRowCount: integer;
|
function GetFooterRowCount: integer;
|
||||||
|
function GetMarkerDown: TBitmap;
|
||||||
|
function GetMarkerUp: TBitmap;
|
||||||
function GetPropertyStorage: TCustomPropertyStorage;
|
function GetPropertyStorage: TCustomPropertyStorage;
|
||||||
function GetSortField: string;
|
function GetSortField: string;
|
||||||
|
function GetSortOrder: TSortMarker;
|
||||||
function GetTitleButtons: boolean;
|
function GetTitleButtons: boolean;
|
||||||
function IsColumnsStored: boolean;
|
function IsColumnsStored: boolean;
|
||||||
procedure SetAutoSort(const AValue: boolean);
|
procedure SetAutoSort(const AValue: boolean);
|
||||||
@ -488,6 +506,8 @@ type
|
|||||||
procedure SetFooterOptions(AValue: TRxDBGridFooterOptions);
|
procedure SetFooterOptions(AValue: TRxDBGridFooterOptions);
|
||||||
procedure SetFooterRowCount(const AValue: integer);
|
procedure SetFooterRowCount(const AValue: integer);
|
||||||
procedure SetKeyStrokes(const AValue: TRxDBGridKeyStrokes);
|
procedure SetKeyStrokes(const AValue: TRxDBGridKeyStrokes);
|
||||||
|
procedure SetMarkerDown(AValue: TBitmap);
|
||||||
|
procedure SetMarkerUp(AValue: TBitmap);
|
||||||
procedure SetOptionsRx(const AValue: TOptionsRx);
|
procedure SetOptionsRx(const AValue: TOptionsRx);
|
||||||
procedure SetPropertyStorage(const AValue: TCustomPropertyStorage);
|
procedure SetPropertyStorage(const AValue: TCustomPropertyStorage);
|
||||||
procedure SetTitleButtons(const AValue: boolean);
|
procedure SetTitleButtons(const AValue: boolean);
|
||||||
@ -518,6 +538,9 @@ type
|
|||||||
procedure OnIniLoad(Sender: TObject);
|
procedure OnIniLoad(Sender: TObject);
|
||||||
|
|
||||||
procedure CleanDSEvent;
|
procedure CleanDSEvent;
|
||||||
|
procedure CollumnSortListUpdate;
|
||||||
|
procedure CollumnSortListClear;
|
||||||
|
procedure CollumnSortListApply;
|
||||||
protected
|
protected
|
||||||
function DatalinkActive: boolean;
|
function DatalinkActive: boolean;
|
||||||
procedure LinkActive(Value: Boolean); override;
|
procedure LinkActive(Value: Boolean); override;
|
||||||
@ -536,7 +559,7 @@ type
|
|||||||
|
|
||||||
procedure DrawFooterRows; virtual;
|
procedure DrawFooterRows; virtual;
|
||||||
|
|
||||||
procedure DoTitleClick(ACol: longint; AField: TField); virtual;
|
procedure DoTitleClick(ACol: longint; ACollumn: TRxColumn; Shift: TShiftState); virtual;
|
||||||
procedure MouseMove(Shift: TShiftState; X, Y: integer); override;
|
procedure MouseMove(Shift: TShiftState; X, Y: integer); override;
|
||||||
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
|
procedure MouseDown(Button: TMouseButton; Shift: TShiftState;
|
||||||
X, Y: integer); override;
|
X, Y: integer); override;
|
||||||
@ -588,6 +611,7 @@ type
|
|||||||
procedure LayoutChanged; override;
|
procedure LayoutChanged; override;
|
||||||
procedure ShowFindDialog;
|
procedure ShowFindDialog;
|
||||||
procedure ShowColumnsDialog;
|
procedure ShowColumnsDialog;
|
||||||
|
procedure ShowSortDialog;
|
||||||
function ColumnByFieldName(AFieldName: string): TRxColumn;
|
function ColumnByFieldName(AFieldName: string): TRxColumn;
|
||||||
function ColumnByCaption(ACaption: string): TRxColumn;
|
function ColumnByCaption(ACaption: string): TRxColumn;
|
||||||
procedure CalcStatTotals;
|
procedure CalcStatTotals;
|
||||||
@ -606,9 +630,13 @@ type
|
|||||||
property FocusRectVisible;
|
property FocusRectVisible;
|
||||||
property SelectedRows;
|
property SelectedRows;
|
||||||
property QuickUTF8Search: string read FQuickUTF8Search write SetQuickUTF8Search;
|
property QuickUTF8Search: string read FQuickUTF8Search write SetQuickUTF8Search;
|
||||||
property SortField:string read GetSortField;
|
|
||||||
property SortOrder:TSortMarker read FSortOrder;
|
|
||||||
|
|
||||||
|
property SortField:string read GetSortField;
|
||||||
|
property SortOrder:TSortMarker read GetSortOrder;
|
||||||
|
|
||||||
|
property SortColumns:TRxDbGridColumnsSortList read FSortColumns;
|
||||||
|
property MarkerUp : TBitmap read GetMarkerUp write SetMarkerUp;
|
||||||
|
property MarkerDown : TBitmap read GetMarkerDown write SetMarkerDown;
|
||||||
published
|
published
|
||||||
property AfterQuickSearch: TRxQuickSearchNotifyEvent
|
property AfterQuickSearch: TRxQuickSearchNotifyEvent
|
||||||
read FAfterQuickSearch write FAfterQuickSearch;
|
read FAfterQuickSearch write FAfterQuickSearch;
|
||||||
@ -816,6 +844,13 @@ type
|
|||||||
procedure EditingDone; override;
|
procedure EditingDone; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TRxDbGridColumnsSortList }
|
||||||
|
|
||||||
|
function TRxDbGridColumnsSortList.GetCollumn(Index: Integer): TRxColumn;
|
||||||
|
begin
|
||||||
|
Result:=TRxColumn(Items[Index]);
|
||||||
|
end;
|
||||||
|
|
||||||
{ TRxColumnEditButton }
|
{ TRxColumnEditButton }
|
||||||
|
|
||||||
function TRxColumnEditButton.GetGlyph: TBitmap;
|
function TRxColumnEditButton.GetGlyph: TBitmap;
|
||||||
@ -1487,8 +1522,9 @@ begin
|
|||||||
FSortEngine := RxDBGridSortEngineList.Objects[Pos] as TRxDBGridSortEngine
|
FSortEngine := RxDBGridSortEngineList.Objects[Pos] as TRxDBGridSortEngine
|
||||||
else
|
else
|
||||||
FSortEngine := nil;
|
FSortEngine := nil;
|
||||||
FSortField := nil;
|
{ FSortField := nil;
|
||||||
FSortOrder := smNone;
|
FSortOrder := smNone;}
|
||||||
|
FSortColumns.Clear;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1507,6 +1543,16 @@ begin
|
|||||||
Result:=FFooterOptions.RowCount;
|
Result:=FFooterOptions.RowCount;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRxDBGrid.GetMarkerDown: TBitmap;
|
||||||
|
begin
|
||||||
|
Result:=FMarkerDown;
|
||||||
|
end;
|
||||||
|
|
||||||
|
function TRxDBGrid.GetMarkerUp: TBitmap;
|
||||||
|
begin
|
||||||
|
Result:=FMarkerUp;
|
||||||
|
end;
|
||||||
|
|
||||||
function TRxDBGrid.GetDrawFullLine: boolean;
|
function TRxDBGrid.GetDrawFullLine: boolean;
|
||||||
begin
|
begin
|
||||||
Result := FDrawFullLine;
|
Result := FDrawFullLine;
|
||||||
@ -1552,12 +1598,20 @@ end;
|
|||||||
|
|
||||||
function TRxDBGrid.GetSortField: string;
|
function TRxDBGrid.GetSortField: string;
|
||||||
begin
|
begin
|
||||||
if Assigned(FSortField) then
|
if FSortColumns.Count > 0 then
|
||||||
Result:=FSortField.FieldName
|
Result:=FSortColumns[0].FieldName
|
||||||
else
|
else
|
||||||
Result:='';
|
Result:='';
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TRxDBGrid.GetSortOrder: TSortMarker;
|
||||||
|
begin
|
||||||
|
if FSortColumns.Count > 0 then
|
||||||
|
Result:=FSortColumns[0].SortOrder
|
||||||
|
else
|
||||||
|
Result:=smNone;
|
||||||
|
end;
|
||||||
|
|
||||||
function TRxDBGrid.GetTitleButtons: boolean;
|
function TRxDBGrid.GetTitleButtons: boolean;
|
||||||
begin
|
begin
|
||||||
Result := dgHeaderPushedLook in Options;
|
Result := dgHeaderPushedLook in Options;
|
||||||
@ -1598,6 +1652,16 @@ begin
|
|||||||
UpdateJMenuKeys;
|
UpdateJMenuKeys;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.SetMarkerDown(AValue: TBitmap);
|
||||||
|
begin
|
||||||
|
FMarkerDown.Assign(AValue);
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.SetMarkerUp(AValue: TBitmap);
|
||||||
|
begin
|
||||||
|
FMarkerUp.Assign(AValue);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.SetOptionsRx(const AValue: TOptionsRx);
|
procedure TRxDBGrid.SetOptionsRx(const AValue: TOptionsRx);
|
||||||
var
|
var
|
||||||
OldOpt: TOptionsRx;
|
OldOpt: TOptionsRx;
|
||||||
@ -2029,6 +2093,9 @@ begin
|
|||||||
FPropertyStorageLink.Storage.WriteInteger(S1 + sVisible, Ord(C.Visible));
|
FPropertyStorageLink.Storage.WriteInteger(S1 + sVisible, Ord(C.Visible));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{ TODO : Необходимо подключить сохранение списка колонок сортировки }
|
||||||
|
{
|
||||||
|
FSortColumns;
|
||||||
if Assigned(FSortField) then
|
if Assigned(FSortField) then
|
||||||
begin
|
begin
|
||||||
FPropertyStorageLink.Storage.WriteInteger(S1 + sSortMarker, Ord(FSortOrder));
|
FPropertyStorageLink.Storage.WriteInteger(S1 + sSortMarker, Ord(FSortOrder));
|
||||||
@ -2036,6 +2103,7 @@ begin
|
|||||||
end
|
end
|
||||||
else
|
else
|
||||||
FPropertyStorageLink.Storage.WriteInteger(S1 + sSortMarker, Ord(smNone));
|
FPropertyStorageLink.Storage.WriteInteger(S1 + sSortMarker, Ord(smNone));
|
||||||
|
}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.OnIniLoad(Sender: TObject);
|
procedure TRxDBGrid.OnIniLoad(Sender: TObject);
|
||||||
@ -2071,7 +2139,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
FSortOrder := TSortMarker(FPropertyStorageLink.Storage.ReadInteger(
|
{ TODO : Необходимо подключить востановление списка колонок сортировки }
|
||||||
|
{ FSortOrder := TSortMarker(FPropertyStorageLink.Storage.ReadInteger(
|
||||||
S1 + sSortMarker, Ord(smNone)));
|
S1 + sSortMarker, Ord(smNone)));
|
||||||
if Assigned(FSortEngine) and (FSortOrder <> smNone) and DatalinkActive then
|
if Assigned(FSortEngine) and (FSortOrder <> smNone) and DatalinkActive then
|
||||||
begin
|
begin
|
||||||
@ -2083,7 +2152,7 @@ begin
|
|||||||
FSortEngine.Sort(FSortField, DataSource.DataSet, FSortOrder = smUp,
|
FSortEngine.Sort(FSortField, DataSource.DataSet, FSortOrder = smUp,
|
||||||
SortEngineOptions);
|
SortEngineOptions);
|
||||||
end;
|
end;
|
||||||
end;
|
end;}
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2118,6 +2187,72 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.CollumnSortListUpdate;
|
||||||
|
var
|
||||||
|
i, J:integer;
|
||||||
|
C:TRxColumn;
|
||||||
|
|
||||||
|
begin
|
||||||
|
FSortColumns.Clear;
|
||||||
|
for i:=0 to Columns.Count - 1 do
|
||||||
|
begin
|
||||||
|
C:=TRxColumn(Columns[i]);
|
||||||
|
if C.SortOrder <> smNone then
|
||||||
|
begin
|
||||||
|
if FSortColumns.Count <> 0 then
|
||||||
|
begin
|
||||||
|
for j:=0 to FSortColumns.Count-1 do
|
||||||
|
if FSortColumns[j].FSortPosition > C.FSortPosition then
|
||||||
|
begin
|
||||||
|
FSortColumns.Insert(j, C);
|
||||||
|
C:=nil;
|
||||||
|
Break;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
if C<>nil then
|
||||||
|
FSortColumns.Add(C);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
for i:=0 to FSortColumns.Count - 1 do
|
||||||
|
FSortColumns[i].FSortPosition:=i;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.CollumnSortListClear;
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
begin
|
||||||
|
FSortColumns.Clear;
|
||||||
|
for i:=0 to Columns.Count - 1 do
|
||||||
|
begin
|
||||||
|
TRxColumn(Columns[i]).FSortOrder:=smNone;
|
||||||
|
TRxColumn(Columns[i]).FSortPosition:=0;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.CollumnSortListApply;
|
||||||
|
var
|
||||||
|
i:integer;
|
||||||
|
S:string;
|
||||||
|
Asc:array of boolean;
|
||||||
|
begin
|
||||||
|
SetLength(Asc, FSortColumns.Count);
|
||||||
|
for i := 0 to FSortColumns.Count - 1 do
|
||||||
|
begin
|
||||||
|
Asc[i]:=FSortColumns[i].FSortOrder = smUp;
|
||||||
|
if S<>'' then
|
||||||
|
S:=S+';';
|
||||||
|
S:=S + FSortColumns[i].FieldName;
|
||||||
|
end;
|
||||||
|
{ TODO : Необходимо добавить опцию регистронезависимого поиска }
|
||||||
|
|
||||||
|
FSortingNow:=true;
|
||||||
|
FSortEngine.SortList(S, DataSource.DataSet, Asc, SortEngineOptions);
|
||||||
|
//FSortEngine.Sort(FSortColumns[0].Field, DataSource.DataSet, FSortColumns[0].FSortOrder = smUp, SortEngineOptions);
|
||||||
|
FSortingNow:=false;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
||||||
aState: TGridDrawState);
|
aState: TGridDrawState);
|
||||||
begin
|
begin
|
||||||
@ -2140,8 +2275,10 @@ var
|
|||||||
i: integer;
|
i: integer;
|
||||||
Down: boolean;
|
Down: boolean;
|
||||||
aRect2: TRect;
|
aRect2: TRect;
|
||||||
|
|
||||||
FTitle: TRxColumnTitle;
|
FTitle: TRxColumnTitle;
|
||||||
GrdCol: TGridColumn;
|
GrdCol: TRxColumn;
|
||||||
|
|
||||||
MLI, MLINext: TMLCaptionItem;
|
MLI, MLINext: TMLCaptionItem;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
@ -2162,13 +2299,19 @@ begin
|
|||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
GrdCol := TRxColumn(ColumnFromGridColumn(aCol));
|
||||||
|
|
||||||
Down := FPressed and (dgHeaderPushedLook in Options) and
|
Down := FPressed and (dgHeaderPushedLook in Options) and
|
||||||
(FPressedCol = TColumn(ColumnFromGridColumn(aCol)));
|
(FPressedCol = GrdCol);
|
||||||
|
|
||||||
|
{
|
||||||
ASortMarker := smNone;
|
ASortMarker := smNone;
|
||||||
|
|
||||||
if (FSortField = GetFieldFromGridColumn(aCol)) then
|
if (FSortField = GetFieldFromGridColumn(aCol)) then
|
||||||
ASortMarker := FSortOrder;
|
ASortMarker := FSortOrder;}
|
||||||
|
if Assigned(GrdCol) then
|
||||||
|
ASortMarker := GrdCol.FSortOrder
|
||||||
|
else
|
||||||
|
ASortMarker := smNone;
|
||||||
|
|
||||||
if Assigned(FOnGetBtnParams) and Assigned(GetFieldFromGridColumn(aCol)) then
|
if Assigned(FOnGetBtnParams) and Assigned(GetFieldFromGridColumn(aCol)) then
|
||||||
begin
|
begin
|
||||||
@ -2181,7 +2324,7 @@ begin
|
|||||||
if (gdFixed in aState) and (aRow = 0) and (ACol >= FixedCols) then
|
if (gdFixed in aState) and (aRow = 0) and (ACol >= FixedCols) then
|
||||||
begin
|
begin
|
||||||
|
|
||||||
GrdCol := ColumnFromGridColumn(aCol);
|
//GrdCol := ColumnFromGridColumn(aCol);
|
||||||
if Assigned(GrdCol) then
|
if Assigned(GrdCol) then
|
||||||
FTitle := TRxColumnTitle(GrdCol.Title)
|
FTitle := TRxColumnTitle(GrdCol.Title)
|
||||||
else
|
else
|
||||||
@ -2254,6 +2397,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
OutCaptionCellText(aCol, aRow, aRect, aState, GetDefaultColumnTitle(aCol));
|
OutCaptionCellText(aCol, aRow, aRect, aState, GetDefaultColumnTitle(aCol));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
OutCaptionSortMarker(aRect, ASortMarker);
|
OutCaptionSortMarker(aRect, ASortMarker);
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -2486,12 +2630,16 @@ begin
|
|||||||
if SelectedRows.Count > 0 then
|
if SelectedRows.Count > 0 then
|
||||||
SelectedRows.Clear;
|
SelectedRows.Clear;
|
||||||
end;
|
end;
|
||||||
if not FSortingNow then begin
|
|
||||||
|
if not FSortingNow then
|
||||||
|
CollumnSortListClear;
|
||||||
|
{ begin
|
||||||
FSortField := nil;
|
FSortField := nil;
|
||||||
FSortOrder := smNone;
|
FSortOrder := smNone;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
F_SortListField.Clear;
|
F_SortListField.Clear;
|
||||||
|
}
|
||||||
if {not (csDestroying in ComponentState) and} not (csDesigning in ComponentState) then
|
if {not (csDestroying in ComponentState) and} not (csDesigning in ComponentState) then
|
||||||
SetDBHandlers(Value);
|
SetDBHandlers(Value);
|
||||||
end;
|
end;
|
||||||
@ -2633,30 +2781,47 @@ begin
|
|||||||
Canvas.Brush.Color := Background;
|
Canvas.Brush.Color := Background;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.DoTitleClick(ACol: longint; AField: TField);
|
procedure TRxDBGrid.DoTitleClick(ACol: longint; ACollumn: TRxColumn;
|
||||||
|
Shift: TShiftState);
|
||||||
begin
|
begin
|
||||||
if FAutoSort and (FSortEngine <> nil) and (AField <> nil) then
|
if FAutoSort and (FSortEngine <> nil) and (ACollumn.Field <> nil) then
|
||||||
begin
|
begin
|
||||||
if AField = FSortField then
|
if ssCtrl in Shift then
|
||||||
begin
|
begin
|
||||||
if FSortOrder = smUp then
|
if ACollumn.FSortOrder <> smNone then
|
||||||
FSortOrder := smDown
|
begin
|
||||||
|
if ACollumn.FSortOrder = smUp then
|
||||||
|
ACollumn.FSortOrder := smDown
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
ACollumn.FSortOrder := smNone;
|
||||||
|
ACollumn.FSortPosition:=0;
|
||||||
|
end;
|
||||||
|
end
|
||||||
else
|
else
|
||||||
FSortOrder := smUp;
|
begin
|
||||||
|
ACollumn.FSortOrder := smUp;
|
||||||
|
ACollumn.FSortPosition:=FSortColumns.Count;
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
FSortField := AField;
|
if (FSortColumns.Count>0) and (FSortColumns[0] = ACollumn) then
|
||||||
FSortOrder := smUp;
|
begin
|
||||||
|
if FSortColumns[0].FSortOrder = smUp then
|
||||||
|
FSortColumns[0].FSortOrder := smDown
|
||||||
|
else
|
||||||
|
FSortColumns[0].FSortOrder := smUp;
|
||||||
|
end
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
CollumnSortListClear;
|
||||||
|
ACollumn.FSortOrder := smUp;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
FSortingNow:=true;
|
|
||||||
FSortEngine.Sort(FSortField, DataSource.DataSet, FSortOrder =
|
|
||||||
smUp, SortEngineOptions);
|
|
||||||
FSortingNow:=false;
|
|
||||||
|
|
||||||
F_SortListField.Clear;
|
CollumnSortListUpdate;
|
||||||
if Assigned(FSortField) then
|
CollumnSortListApply;
|
||||||
F_SortListField.Add(FSortField.FieldName);
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
HeaderClick(True, ACol);
|
HeaderClick(True, ACol);
|
||||||
@ -2768,7 +2933,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
MouseCapture := True;
|
MouseCapture := True;
|
||||||
FTracking := True;
|
FTracking := True;
|
||||||
FPressedCol := TColumn(ColumnFromGridColumn(Cell.X));
|
FPressedCol := TRxColumn(ColumnFromGridColumn(Cell.X));
|
||||||
TrackButton(X, Y);
|
TrackButton(X, Y);
|
||||||
inherited MouseDown(Button, Shift, X, Y);
|
inherited MouseDown(Button, Shift, X, Y);
|
||||||
end;
|
end;
|
||||||
@ -2813,7 +2978,7 @@ begin
|
|||||||
begin
|
begin
|
||||||
Cell := MouseCoord(X, Y);
|
Cell := MouseCoord(X, Y);
|
||||||
DoClick := PtInRect(Rect(0, 0, ClientWidth, ClientHeight), Point(X, Y)) and
|
DoClick := PtInRect(Rect(0, 0, ClientWidth, ClientHeight), Point(X, Y)) and
|
||||||
(Cell.Y < RowHeights[0]) and (FPressedCol = TColumn(ColumnFromGridColumn(Cell.X)));
|
(Cell.Y < RowHeights[0]) and (FPressedCol = TRxColumn(ColumnFromGridColumn(Cell.X)));
|
||||||
StopTracking;
|
StopTracking;
|
||||||
if DoClick then
|
if DoClick then
|
||||||
begin
|
begin
|
||||||
@ -2822,12 +2987,9 @@ begin
|
|||||||
Dec(ACol);
|
Dec(ACol);
|
||||||
if DataLinkActive and (ACol >= 0) and (ACol < Columns.Count) then
|
if DataLinkActive and (ACol >= 0) and (ACol < Columns.Count) then
|
||||||
begin
|
begin
|
||||||
FPressedCol := ColumnFromGridColumn(Cell.X) as TColumn;
|
FPressedCol := TRxColumn(ColumnFromGridColumn(Cell.X));
|
||||||
if Assigned(FPressedCol) then
|
if Assigned(FPressedCol) then
|
||||||
begin
|
DoTitleClick(FPressedCol.Index, FPressedCol, Shift);
|
||||||
F_SortListField.Clear;
|
|
||||||
DoTitleClick(FPressedCol.Index, FPressedCol.Field);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
@ -3529,35 +3691,44 @@ end;
|
|||||||
procedure TRxDBGrid.OnSortBy(Sender: TObject);
|
procedure TRxDBGrid.OnSortBy(Sender: TObject);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
s: string;
|
S1: string;
|
||||||
o: boolean;
|
FSortListField:TStringList;
|
||||||
|
FColumn:TRxColumn;
|
||||||
begin
|
begin
|
||||||
if DatalinkActive then
|
if DatalinkActive then
|
||||||
begin
|
begin
|
||||||
FSortField := nil;
|
FSortListField:=TStringList.Create;
|
||||||
rxSortByForm := TrxSortByForm.Create(Application);
|
try
|
||||||
rxSortByForm.CheckBox1.Checked := rdgCaseInsensitiveSort in FOptionsRx;
|
rxSortByForm := TrxSortByForm.Create(Application);
|
||||||
o := not (FSortOrder = smDown);
|
rxSortByForm.CheckBox1.Checked := rdgCaseInsensitiveSort in FOptionsRx;
|
||||||
if rxSortByForm.Execute(Self, F_SortListField, o) then
|
if rxSortByForm.Execute(Self, FSortListField) then
|
||||||
begin
|
|
||||||
for i := 0 to F_SortListField.Count - 1 do
|
|
||||||
begin
|
begin
|
||||||
s := s + F_SortListField.Strings[i] + ';';
|
for i := 0 to FSortListField.Count - 1 do
|
||||||
|
begin
|
||||||
|
S1:=FSortListField.Strings[i];
|
||||||
|
FColumn:=TRxColumn(ColumnByFieldName(Copy(S1, 2, Length(S1))));
|
||||||
|
if S1[1] = '1' then
|
||||||
|
FColumn.FSortOrder := smUp
|
||||||
|
else
|
||||||
|
FColumn.FSortOrder := smDown;
|
||||||
|
|
||||||
|
FColumn.FSortPosition:=i;
|
||||||
|
end;
|
||||||
|
|
||||||
|
CollumnSortListUpdate;
|
||||||
|
|
||||||
|
if rxSortByForm.CheckBox1.Checked then
|
||||||
|
Include(FOptionsRx, rdgCaseInsensitiveSort)
|
||||||
|
else
|
||||||
|
Exclude(FOptionsRx, rdgCaseInsensitiveSort);
|
||||||
|
|
||||||
|
CollumnSortListApply;
|
||||||
end;
|
end;
|
||||||
s := Copy(s, 1, Length(s) - 1);
|
|
||||||
if o then
|
|
||||||
FSortOrder := smUp
|
|
||||||
else
|
|
||||||
FSortOrder := smDown;
|
|
||||||
|
|
||||||
if rxSortByForm.CheckBox1.Checked then
|
finally
|
||||||
Include(FOptionsRx, rdgCaseInsensitiveSort)
|
FreeAndNil(rxSortByForm);
|
||||||
else
|
FreeAndNil(FSortListField);
|
||||||
Exclude(FOptionsRx, rdgCaseInsensitiveSort);
|
|
||||||
|
|
||||||
FSortEngine.SortList(s, DataSource.DataSet, o);
|
|
||||||
end;
|
end;
|
||||||
FreeAndNil(rxSortByForm);
|
|
||||||
Invalidate;
|
Invalidate;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -3668,11 +3839,13 @@ begin
|
|||||||
Options := Options - [dgCancelOnExit];
|
Options := Options - [dgCancelOnExit];
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
FSortColumns:=TRxDbGridColumnsSortList.Create;
|
||||||
FKeyStrokes := TRxDBGridKeyStrokes.Create(Self);
|
FKeyStrokes := TRxDBGridKeyStrokes.Create(Self);
|
||||||
FKeyStrokes.ResetDefaults;
|
FKeyStrokes.ResetDefaults;
|
||||||
|
|
||||||
FMarkerUp := LoadLazResBitmapImage('rx_markerup');
|
FMarkerUp := LoadLazResBitmapImage('rx_markerup');
|
||||||
FMarkerDown := LoadLazResBitmapImage('rx_markerdown');
|
FMarkerDown := LoadLazResBitmapImage('rx_markerdown');
|
||||||
|
|
||||||
Options := Options - [dgTabs];
|
Options := Options - [dgTabs];
|
||||||
OptionsRx := OptionsRx + [rdgAllowColumnsForm, rdgAllowDialogFind,
|
OptionsRx := OptionsRx + [rdgAllowColumnsForm, rdgAllowDialogFind,
|
||||||
rdgAllowQuickFilter];
|
rdgAllowQuickFilter];
|
||||||
@ -3687,7 +3860,7 @@ begin
|
|||||||
DoCreateJMenu;
|
DoCreateJMenu;
|
||||||
|
|
||||||
F_LastFilter := TStringList.Create;
|
F_LastFilter := TStringList.Create;
|
||||||
F_SortListField := TStringList.Create;
|
//F_SortListField := TStringList.Create;
|
||||||
|
|
||||||
FPropertyStorageLink := TPropertyStorageLink.Create;
|
FPropertyStorageLink := TPropertyStorageLink.Create;
|
||||||
FPropertyStorageLink.OnSave := @OnIniSave;
|
FPropertyStorageLink.OnSave := @OnIniSave;
|
||||||
@ -3736,10 +3909,10 @@ begin
|
|||||||
FreeAndNil(F_PopupMenu);
|
FreeAndNil(F_PopupMenu);
|
||||||
FreeAndNil(F_MenuBMP);
|
FreeAndNil(F_MenuBMP);
|
||||||
FreeAndNil(F_LastFilter);
|
FreeAndNil(F_LastFilter);
|
||||||
FreeAndNil(F_SortListField);
|
|
||||||
|
|
||||||
FreeAndNil(FKeyStrokes);
|
FreeAndNil(FKeyStrokes);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
|
FreeAndNil(FSortColumns);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxDBGrid.LayoutChanged;
|
procedure TRxDBGrid.LayoutChanged;
|
||||||
@ -3762,6 +3935,11 @@ begin
|
|||||||
ShowRxDBGridColumsForm(Self);
|
ShowRxDBGridColumsForm(Self);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxDBGrid.ShowSortDialog;
|
||||||
|
begin
|
||||||
|
OnSortBy(nil);
|
||||||
|
end;
|
||||||
|
|
||||||
function TRxDBGrid.ColumnByFieldName(AFieldName: string): TRxColumn;
|
function TRxDBGrid.ColumnByFieldName(AFieldName: string): TRxColumn;
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
@ -3792,6 +3970,13 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxDbGridColumns.Notify(Item: TCollectionItem;
|
||||||
|
Action: TCollectionNotification);
|
||||||
|
begin
|
||||||
|
inherited Notify(Item, Action);
|
||||||
|
TRxDBGrid(Grid).CollumnSortListUpdate;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TRxDbGridColumns }
|
{ TRxDbGridColumns }
|
||||||
function TRxDbGridColumns.Add: TRxColumn;
|
function TRxDbGridColumns.Add: TRxColumn;
|
||||||
begin
|
begin
|
||||||
@ -4438,7 +4623,7 @@ end;
|
|||||||
{ TExDBGridSortEngine }
|
{ TExDBGridSortEngine }
|
||||||
|
|
||||||
procedure TRxDBGridSortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
procedure TRxDBGridSortEngine.SortList(ListField: string; ADataSet: TDataSet;
|
||||||
Asc: boolean);
|
Asc: array of boolean; SortOptions: TRxSortEngineOptions);
|
||||||
begin
|
begin
|
||||||
|
|
||||||
end;
|
end;
|
||||||
|
@ -163,6 +163,8 @@ type
|
|||||||
Options: TLocateOptions): Boolean; override;
|
Options: TLocateOptions): Boolean; override;
|
||||||
procedure SortOnFields(const FieldNames: string;
|
procedure SortOnFields(const FieldNames: string;
|
||||||
CaseInsensitive: Boolean = True; Descending: Boolean = False);
|
CaseInsensitive: Boolean = True; Descending: Boolean = False);
|
||||||
|
procedure SortOnFieldsEx(const FieldNames: string;
|
||||||
|
CaseInsensitive: Boolean = True; Asc: array of boolean);
|
||||||
procedure EmptyTable;
|
procedure EmptyTable;
|
||||||
procedure CloseOpen;
|
procedure CloseOpen;
|
||||||
procedure CopyStructure(Source: TDataSet);
|
procedure CopyStructure(Source: TDataSet);
|
||||||
@ -1620,6 +1622,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TRxMemoryData.SortOnFieldsEx(const FieldNames: string;
|
||||||
|
CaseInsensitive: Boolean; Asc: array of boolean);
|
||||||
|
begin
|
||||||
|
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TRxMemoryData.Sort;
|
procedure TRxMemoryData.Sort;
|
||||||
var
|
var
|
||||||
Pos: TBookmark;
|
Pos: TBookmark;
|
||||||
|
@ -26,7 +26,7 @@ Copyright (c) 1998 Master-Bank
|
|||||||
translate to Lazarus by alexs in 2005 - 2012
|
translate to Lazarus by alexs in 2005 - 2012
|
||||||
"/>
|
"/>
|
||||||
<License Value="LGPL"/>
|
<License Value="LGPL"/>
|
||||||
<Version Major="2" Minor="2" Release="3" Build="114"/>
|
<Version Major="2" Minor="3" Release="1" Build="116"/>
|
||||||
<Files Count="66">
|
<Files Count="66">
|
||||||
<Item1>
|
<Item1>
|
||||||
<Filename Value="autopanel.pas"/>
|
<Filename Value="autopanel.pas"/>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
object rxSortByForm: TrxSortByForm
|
object rxSortByForm: TrxSortByForm
|
||||||
Left = 450
|
Left = 450
|
||||||
Height = 411
|
Height = 398
|
||||||
Top = 243
|
Top = 243
|
||||||
Width = 684
|
Width = 684
|
||||||
ActiveControl = AddBtn
|
ActiveControl = AddBtn
|
||||||
Caption = 'Sort by fields'
|
Caption = 'Sort by fields'
|
||||||
ClientHeight = 411
|
ClientHeight = 398
|
||||||
ClientWidth = 684
|
ClientWidth = 684
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
@ -35,28 +35,14 @@ object rxSortByForm: TrxSortByForm
|
|||||||
FocusControl = ListBox2
|
FocusControl = ListBox2
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
end
|
end
|
||||||
object Label4: TLabel
|
|
||||||
AnchorSideLeft.Control = Owner
|
|
||||||
AnchorSideBottom.Control = ComboBox1
|
|
||||||
AnchorSideBottom.Side = asrBottom
|
|
||||||
Left = 6
|
|
||||||
Height = 15
|
|
||||||
Top = 314
|
|
||||||
Width = 104
|
|
||||||
Anchors = [akLeft, akBottom]
|
|
||||||
BorderSpacing.Left = 6
|
|
||||||
Caption = 'Select sort order'
|
|
||||||
FocusControl = ComboBox1
|
|
||||||
ParentColor = False
|
|
||||||
end
|
|
||||||
object ListBox2: TListBox
|
object ListBox2: TListBox
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Label2
|
AnchorSideTop.Control = Label2
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = AddBtn
|
AnchorSideRight.Control = AddBtn
|
||||||
AnchorSideBottom.Control = ComboBox1
|
AnchorSideBottom.Control = CheckBox1
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 267
|
Height = 289
|
||||||
Top = 27
|
Top = 27
|
||||||
Width = 262
|
Width = 262
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
@ -163,22 +149,6 @@ object rxSortByForm: TrxSortByForm
|
|||||||
OnClick = DownBtnClick
|
OnClick = DownBtnClick
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object ComboBox1: TComboBox
|
|
||||||
AnchorSideLeft.Control = Label4
|
|
||||||
AnchorSideLeft.Side = asrBottom
|
|
||||||
AnchorSideRight.Control = Owner
|
|
||||||
AnchorSideRight.Side = asrBottom
|
|
||||||
AnchorSideBottom.Control = CheckBox1
|
|
||||||
Left = 116
|
|
||||||
Height = 29
|
|
||||||
Top = 300
|
|
||||||
Width = 562
|
|
||||||
Anchors = [akLeft, akRight, akBottom]
|
|
||||||
BorderSpacing.Around = 6
|
|
||||||
ItemHeight = 0
|
|
||||||
Style = csDropDownList
|
|
||||||
TabOrder = 5
|
|
||||||
end
|
|
||||||
object ListBox1: TListBox
|
object ListBox1: TListBox
|
||||||
AnchorSideLeft.Control = AddBtn
|
AnchorSideLeft.Control = AddBtn
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
@ -186,17 +156,19 @@ object rxSortByForm: TrxSortByForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = Owner
|
AnchorSideRight.Control = Owner
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ComboBox1
|
AnchorSideBottom.Control = CheckBox1
|
||||||
Left = 417
|
Left = 417
|
||||||
Height = 267
|
Height = 289
|
||||||
Top = 27
|
Top = 27
|
||||||
Width = 261
|
Width = 261
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnDblClick = ListBox1DblClick
|
OnDblClick = SpeedButton1Click
|
||||||
|
OnDrawItem = ListBox1DrawItem
|
||||||
ScrollWidth = 259
|
ScrollWidth = 259
|
||||||
TabOrder = 6
|
Style = lbOwnerDrawFixed
|
||||||
|
TabOrder = 5
|
||||||
TopIndex = -1
|
TopIndex = -1
|
||||||
end
|
end
|
||||||
object AddBtn: TBitBtn
|
object AddBtn: TBitBtn
|
||||||
@ -231,7 +203,7 @@ object rxSortByForm: TrxSortByForm
|
|||||||
object ButtonPanel1: TButtonPanel
|
object ButtonPanel1: TButtonPanel
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 42
|
Height = 42
|
||||||
Top = 363
|
Top = 350
|
||||||
Width = 672
|
Width = 672
|
||||||
OKButton.Name = 'OKButton'
|
OKButton.Name = 'OKButton'
|
||||||
OKButton.DefaultCaption = True
|
OKButton.DefaultCaption = True
|
||||||
@ -241,21 +213,21 @@ object rxSortByForm: TrxSortByForm
|
|||||||
CloseButton.DefaultCaption = True
|
CloseButton.DefaultCaption = True
|
||||||
CancelButton.Name = 'CancelButton'
|
CancelButton.Name = 'CancelButton'
|
||||||
CancelButton.DefaultCaption = True
|
CancelButton.DefaultCaption = True
|
||||||
TabOrder = 7
|
TabOrder = 6
|
||||||
ShowButtons = [pbOK, pbCancel, pbHelp]
|
ShowButtons = [pbOK, pbCancel, pbHelp]
|
||||||
end
|
end
|
||||||
object CheckBox1: TCheckBox
|
object CheckBox1: TCheckBox
|
||||||
AnchorSideLeft.Control = Owner
|
AnchorSideLeft.Control = Owner
|
||||||
AnchorSideTop.Control = Label4
|
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideBottom.Control = ButtonPanel1
|
AnchorSideBottom.Control = ButtonPanel1
|
||||||
Left = 6
|
Left = 6
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 335
|
Top = 322
|
||||||
Width = 151
|
Width = 151
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Case insensitive sort'
|
Caption = 'Case insensitive sort'
|
||||||
TabOrder = 8
|
Enabled = False
|
||||||
|
TabOrder = 7
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -37,7 +37,7 @@ interface
|
|||||||
|
|
||||||
uses
|
uses
|
||||||
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
|
||||||
StdCtrls, Buttons, ButtonPanel, rxdbgrid, db;
|
StdCtrls, Buttons, ButtonPanel, rxdbgrid, db, types;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -47,11 +47,9 @@ type
|
|||||||
AddBtn: TBitBtn;
|
AddBtn: TBitBtn;
|
||||||
ButtonPanel1: TButtonPanel;
|
ButtonPanel1: TButtonPanel;
|
||||||
CheckBox1: TCheckBox;
|
CheckBox1: TCheckBox;
|
||||||
ComboBox1: TComboBox;
|
|
||||||
DownBtn: TBitBtn;
|
DownBtn: TBitBtn;
|
||||||
Label1: TLabel;
|
Label1: TLabel;
|
||||||
Label2: TLabel;
|
Label2: TLabel;
|
||||||
Label4: TLabel;
|
|
||||||
ListBox1: TListBox;
|
ListBox1: TListBox;
|
||||||
ListBox2: TListBox;
|
ListBox2: TListBox;
|
||||||
RemoveBtn: TBitBtn;
|
RemoveBtn: TBitBtn;
|
||||||
@ -60,14 +58,17 @@ type
|
|||||||
procedure DownBtnClick(Sender: TObject);
|
procedure DownBtnClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure ListBox1DblClick(Sender: TObject);
|
procedure ListBox1DblClick(Sender: TObject);
|
||||||
|
procedure ListBox1DrawItem(Control: TWinControl; Index: Integer;
|
||||||
|
ARect: TRect; State: TOwnerDrawState);
|
||||||
procedure ListBox2DblClick(Sender: TObject);
|
procedure ListBox2DblClick(Sender: TObject);
|
||||||
procedure RemoveBtnClick(Sender: TObject);
|
procedure RemoveBtnClick(Sender: TObject);
|
||||||
|
procedure SpeedButton1Click(Sender: TObject);
|
||||||
procedure UpBtnClick(Sender: TObject);
|
procedure UpBtnClick(Sender: TObject);
|
||||||
private
|
private
|
||||||
|
FDBGrid:TRxDBGrid;
|
||||||
public
|
public
|
||||||
{ public declarations }
|
{ public declarations }
|
||||||
function Execute(ADBGrid:TRxDBGrid; SortFieldNames:TStringList; var Asc:boolean):Boolean;
|
function Execute(ADBGrid:TRxDBGrid; SortNames:TStringList):Boolean;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -104,13 +105,13 @@ end;
|
|||||||
|
|
||||||
procedure TrxSortByForm.FormCreate(Sender: TObject);
|
procedure TrxSortByForm.FormCreate(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
ComboBox1.Clear;
|
{ ComboBox1.Clear;
|
||||||
ComboBox1.Items.Add(sRxAscendign);
|
ComboBox1.Items.Add(sRxAscendign);
|
||||||
ComboBox1.Items.Add(sRxDescending);
|
ComboBox1.Items.Add(sRxDescending);}
|
||||||
Caption:=sRxSortByFormCaption;
|
Caption:=sRxSortByFormCaption;
|
||||||
Label2.Caption:=sRxSortByFormAllFields;
|
Label2.Caption:=sRxSortByFormAllFields;
|
||||||
Label1.Caption:=sRxSortByFormSortFields;
|
Label1.Caption:=sRxSortByFormSortFields;
|
||||||
Label4.Caption:=sRxSortByFormSortOrder;
|
// Label4.Caption:=sRxSortByFormSortOrder;
|
||||||
AddBtn.Caption:=sRxSortByFormAddField;
|
AddBtn.Caption:=sRxSortByFormAddField;
|
||||||
RemoveBtn.Caption:=sRxSortByFormRemoveField;
|
RemoveBtn.Caption:=sRxSortByFormRemoveField;
|
||||||
UpBtn.Caption:=sRxSortByFormMoveUpField;
|
UpBtn.Caption:=sRxSortByFormMoveUpField;
|
||||||
@ -123,6 +124,31 @@ begin
|
|||||||
RemoveBtn.Click;
|
RemoveBtn.Click;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TrxSortByForm.ListBox1DrawItem(Control: TWinControl; Index: Integer;
|
||||||
|
ARect: TRect; State: TOwnerDrawState);
|
||||||
|
var
|
||||||
|
X, Y:integer;
|
||||||
|
P:TRxColumn;
|
||||||
|
S1, S2:string;
|
||||||
|
Cnv:TCanvas;
|
||||||
|
begin
|
||||||
|
Cnv:=ListBox1.Canvas;
|
||||||
|
Cnv.FillRect(ARect); { clear the rectangle }
|
||||||
|
P:=TRxColumn(ListBox1.Items.Objects[Index]);
|
||||||
|
S1:=ListBox1.Items[Index];
|
||||||
|
S2:=Copy(S1, 1, 1);
|
||||||
|
Delete(S1, 1, 1);
|
||||||
|
|
||||||
|
X := aRect.Left + 2;
|
||||||
|
Y := Trunc((aRect.Top + aRect.Bottom - UpBtn.Glyph.Height) / 2);
|
||||||
|
|
||||||
|
if S2 = '1' then
|
||||||
|
Cnv.Draw(X, Y, UpBtn.Glyph)
|
||||||
|
else
|
||||||
|
Cnv.Draw(X, Y, DownBtn.Glyph);
|
||||||
|
|
||||||
|
Cnv.TextOut(ARect.Left + UpBtn.Glyph.Width + 6, (ARect.Top + ARect.Bottom - Cnv.TextHeight('Wg')) div 2, S1);
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TrxSortByForm.ListBox2DblClick(Sender: TObject);
|
procedure TrxSortByForm.ListBox2DblClick(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
@ -131,24 +157,45 @@ end;
|
|||||||
|
|
||||||
|
|
||||||
procedure TrxSortByForm.AddBtnClick(Sender: TObject);
|
procedure TrxSortByForm.AddBtnClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
S:string;
|
||||||
begin
|
begin
|
||||||
if ListBox2.ItemIndex <> -1 Then
|
if ListBox2.ItemIndex <> -1 Then
|
||||||
begin
|
begin
|
||||||
ListBox1.Items.Objects[ListBox1.Items.Add(ListBox2.Items[ListBox2.ItemIndex])]:=ListBox2.Items.Objects[ListBox2.ItemIndex];
|
S:='1'+ListBox2.Items[ListBox2.ItemIndex];
|
||||||
|
ListBox1.Items.Objects[ListBox1.Items.Add(S)]:=ListBox2.Items.Objects[ListBox2.ItemIndex];
|
||||||
ListBox2.Items.Delete(ListBox2.ItemIndex);
|
ListBox2.Items.Delete(ListBox2.ItemIndex);
|
||||||
ListBox1.ItemIndex:=ListBox1.Items.Count-1;
|
ListBox1.ItemIndex:=ListBox1.Items.Count-1;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TrxSortByForm.RemoveBtnClick(Sender: TObject);
|
procedure TrxSortByForm.RemoveBtnClick(Sender: TObject);
|
||||||
|
var
|
||||||
|
S:string;
|
||||||
begin
|
begin
|
||||||
if ListBox1.ItemIndex <> -1 Then
|
if ListBox1.ItemIndex <> -1 Then
|
||||||
begin
|
begin
|
||||||
ListBox2.Items.Objects[ListBox2.Items.Add(ListBox1.Items[ListBox1.ItemIndex])]:=ListBox1.Items.Objects[ListBox1.ItemIndex];
|
S:=TRxColumn(ListBox1.Items.Objects[ListBox1.ItemIndex]).Title.Caption;
|
||||||
|
ListBox2.Items.Objects[ListBox2.Items.Add(S)]:=ListBox1.Items.Objects[ListBox1.ItemIndex];
|
||||||
ListBox1.Items.Delete(ListBox1.ItemIndex);
|
ListBox1.Items.Delete(ListBox1.ItemIndex);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TrxSortByForm.SpeedButton1Click(Sender: TObject);
|
||||||
|
var
|
||||||
|
S:string;
|
||||||
|
begin
|
||||||
|
if (ListBox1.ItemIndex <> -1) then
|
||||||
|
begin
|
||||||
|
S:=ListBox1.Items[ListBox1.ItemIndex];
|
||||||
|
if S[1] = '1' then
|
||||||
|
S[1] := '0'
|
||||||
|
else
|
||||||
|
S[1] := '1';
|
||||||
|
ListBox1.Items[ListBox1.ItemIndex]:=S;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TrxSortByForm.UpBtnClick(Sender: TObject);
|
procedure TrxSortByForm.UpBtnClick(Sender: TObject);
|
||||||
var
|
var
|
||||||
TmpField:String;
|
TmpField:String;
|
||||||
@ -172,41 +219,48 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TrxSortByForm.Execute(ADBGrid: TRxDBGrid;
|
function TrxSortByForm.Execute(ADBGrid: TRxDBGrid; SortNames: TStringList
|
||||||
SortFieldNames: TStringList; var Asc: boolean): Boolean;
|
): Boolean;
|
||||||
var
|
var
|
||||||
i, j : Integer;
|
i, j : Integer;
|
||||||
S : String;
|
S : String;
|
||||||
C:TColumn;
|
C:TRxColumn;
|
||||||
begin
|
begin
|
||||||
Result:=False;
|
Result:=False;
|
||||||
if not (Assigned(ADBGrid.DataSource) and Assigned(ADBGrid.DataSource.DataSet) and ADBGrid.DataSource.DataSet.Active) then exit;
|
if not (Assigned(ADBGrid.DataSource) and Assigned(ADBGrid.DataSource.DataSet) and ADBGrid.DataSource.DataSet.Active) then exit;
|
||||||
|
|
||||||
|
FDBGrid:=ADBGrid;
|
||||||
|
|
||||||
ListBox1.Clear;
|
ListBox1.Clear;
|
||||||
ListBox2.Clear;
|
ListBox2.Clear;
|
||||||
|
|
||||||
if not Asc then
|
|
||||||
ComboBox1.ItemIndex:=1
|
|
||||||
else
|
|
||||||
ComboBox1.ItemIndex:=0;
|
|
||||||
|
|
||||||
for i:=0 to ADBGrid.Columns.Count-1 do
|
for i:=0 to ADBGrid.Columns.Count-1 do
|
||||||
begin
|
begin
|
||||||
C:=ADBGrid.Columns[i];
|
C:=TRxColumn(ADBGrid.Columns[i]);
|
||||||
if SortFieldNames.IndexOf(C.Field.FieldName) > -1 then
|
if C.SortOrder = smNone then
|
||||||
ListBox1.Items.Objects[ListBox1.Items.Add(C.Title.Caption)]:=C
|
|
||||||
else
|
|
||||||
ListBox2.Items.Objects[ListBox2.Items.Add(C.Title.Caption)]:=C;
|
ListBox2.Items.Objects[ListBox2.Items.Add(C.Title.Caption)]:=C;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
for i:=0 to ADBGrid.SortColumns.Count-1 do
|
||||||
|
begin
|
||||||
|
C:=ADBGrid.SortColumns[i];
|
||||||
|
|
||||||
|
if C.SortOrder = smUp then
|
||||||
|
S:='1'+C.Title.Caption
|
||||||
|
else
|
||||||
|
S:='0'+C.Title.Caption;
|
||||||
|
|
||||||
|
ListBox1.Items.Objects[ListBox1.Items.Add(S)]:=C
|
||||||
|
end;
|
||||||
|
|
||||||
if ShowModal = mrOK Then
|
if ShowModal = mrOK Then
|
||||||
begin
|
begin
|
||||||
Asc:= ComboBox1.ItemIndex = 0;
|
SortNames.Clear;
|
||||||
|
|
||||||
SortFieldNames.Clear;
|
|
||||||
for i:=0 to ListBox1.Items.Count-1 do
|
for i:=0 to ListBox1.Items.Count-1 do
|
||||||
begin
|
begin
|
||||||
C:=ListBox1.Items.Objects[i] as TColumn;
|
C:=ListBox1.Items.Objects[i] as TRxColumn;
|
||||||
SortFieldNames.Add(C.FieldName);
|
SortNames.Add(Copy(ListBox1.Items[i], 1, 1) + C.FieldName);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result:=True;
|
Result:=True;
|
||||||
|
@ -45,7 +45,7 @@ type
|
|||||||
TRxMemoryDataSortEngine = class(TRxDBGridSortEngine)
|
TRxMemoryDataSortEngine = class(TRxDBGridSortEngine)
|
||||||
public
|
public
|
||||||
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
procedure Sort(Field:TField; ADataSet:TDataSet; Asc:boolean; SortOptions:TRxSortEngineOptions);override;
|
||||||
procedure SortList(ListField:string; ADataSet:TDataSet; Asc:boolean);override;
|
procedure SortList(ListField:string; ADataSet:TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -59,10 +59,10 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TRxMemoryDataSortEngine.SortList(ListField: string;
|
procedure TRxMemoryDataSortEngine.SortList(ListField: string;
|
||||||
ADataSet: TDataSet; Asc: boolean);
|
ADataSet: TDataSet; Asc: array of boolean; SortOptions: TRxSortEngineOptions);
|
||||||
begin
|
begin
|
||||||
if Assigned(ADataSet) then
|
if Assigned(ADataSet) then
|
||||||
(ADataSet as TRxMemoryData).SortOnFields(ListField, true, not Asc);
|
(ADataSet as TRxMemoryData).SortOnFieldsEx(ListField, seoCaseInsensitiveSort in SortOptions, Asc);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
@ -12,15 +12,15 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
OnDestroy = FormDestroy
|
OnDestroy = FormDestroy
|
||||||
OnResize = FormResize
|
OnResize = FormResize
|
||||||
Position = poScreenCenter
|
Position = poScreenCenter
|
||||||
LCLVersion = '0.9.31'
|
LCLVersion = '1.1'
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 433
|
Height = 433
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 657
|
Width = 657
|
||||||
ActivePage = TabSheet2
|
ActivePage = TabSheet1
|
||||||
Align = alClient
|
Align = alClient
|
||||||
TabIndex = 1
|
TabIndex = 0
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Caption = 'Visible buttons'
|
Caption = 'Visible buttons'
|
||||||
@ -30,10 +30,10 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
AnchorSideLeft.Control = BitBtn3
|
AnchorSideLeft.Control = BitBtn3
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = TabSheet1
|
AnchorSideTop.Control = TabSheet1
|
||||||
Left = 350
|
Left = 349
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 114
|
Width = 102
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Avaliable buttons'
|
Caption = 'Avaliable buttons'
|
||||||
FocusControl = ListBtnAvaliable
|
FocusControl = ListBtnAvaliable
|
||||||
@ -42,9 +42,9 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
object Label2: TLabel
|
object Label2: TLabel
|
||||||
AnchorSideTop.Control = TabSheet1
|
AnchorSideTop.Control = TabSheet1
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 16
|
Height = 15
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 98
|
Width = 89
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Visible buttons'
|
Caption = 'Visible buttons'
|
||||||
FocusControl = ListBtnVisible
|
FocusControl = ListBtnVisible
|
||||||
@ -56,15 +56,14 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = BitBtn6
|
AnchorSideRight.Control = BitBtn6
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 306
|
Left = 307
|
||||||
Height = 30
|
Height = 30
|
||||||
Top = 146
|
Top = 145
|
||||||
Width = 38
|
Width = 36
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.InnerBorder = 2
|
BorderSpacing.InnerBorder = 2
|
||||||
Caption = '<<'
|
Caption = '<<'
|
||||||
NumGlyphs = 0
|
|
||||||
OnClick = BitBtn3Click
|
OnClick = BitBtn3Click
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
end
|
end
|
||||||
@ -74,16 +73,15 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = BitBtn6
|
AnchorSideRight.Control = BitBtn6
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 306
|
Left = 307
|
||||||
Height = 31
|
Height = 31
|
||||||
Top = 109
|
Top = 108
|
||||||
Width = 38
|
Width = 36
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.InnerBorder = 2
|
BorderSpacing.InnerBorder = 2
|
||||||
Caption = '<'
|
Caption = '<'
|
||||||
NumGlyphs = 0
|
|
||||||
OnClick = BitBtn4Click
|
OnClick = BitBtn4Click
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
end
|
end
|
||||||
@ -93,15 +91,14 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = BitBtn6
|
AnchorSideRight.Control = BitBtn6
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 306
|
Left = 307
|
||||||
Height = 38
|
Height = 38
|
||||||
Top = 65
|
Top = 64
|
||||||
Width = 38
|
Width = 36
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Top = 6
|
BorderSpacing.Top = 6
|
||||||
BorderSpacing.InnerBorder = 2
|
BorderSpacing.InnerBorder = 2
|
||||||
Caption = '>'
|
Caption = '>'
|
||||||
NumGlyphs = 0
|
|
||||||
OnClick = BitBtn5Click
|
OnClick = BitBtn5Click
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
end
|
end
|
||||||
@ -109,14 +106,13 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
AnchorSideLeft.Control = TabSheet1
|
AnchorSideLeft.Control = TabSheet1
|
||||||
AnchorSideLeft.Side = asrCenter
|
AnchorSideLeft.Side = asrCenter
|
||||||
AnchorSideTop.Control = ListBtnAvaliable
|
AnchorSideTop.Control = ListBtnAvaliable
|
||||||
Left = 306
|
Left = 307
|
||||||
Height = 31
|
Height = 31
|
||||||
Top = 28
|
Top = 27
|
||||||
Width = 38
|
Width = 36
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.InnerBorder = 2
|
BorderSpacing.InnerBorder = 2
|
||||||
Caption = '>>'
|
Caption = '>>'
|
||||||
NumGlyphs = 0
|
|
||||||
OnClick = BitBtn6Click
|
OnClick = BitBtn6Click
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
end
|
end
|
||||||
@ -128,10 +124,10 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
AnchorSideRight.Control = TabSheet1
|
AnchorSideRight.Control = TabSheet1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
AnchorSideBottom.Control = cbShowCaption
|
AnchorSideBottom.Control = cbShowCaption
|
||||||
Left = 350
|
Left = 349
|
||||||
Height = 270
|
Height = 271
|
||||||
Top = 28
|
Top = 27
|
||||||
Width = 295
|
Width = 296
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
IntegralHeight = True
|
IntegralHeight = True
|
||||||
@ -147,7 +143,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnClick = ListBtnAvaliableClick
|
OnClick = ListBtnAvaliableClick
|
||||||
OnDrawItem = ListBox1DrawItem
|
OnDrawItem = ListBox1DrawItem
|
||||||
ScrollWidth = 293
|
ScrollWidth = 294
|
||||||
Style = lbOwnerDrawFixed
|
Style = lbOwnerDrawFixed
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
@ -158,15 +154,15 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
AnchorSideRight.Control = BitBtn6
|
AnchorSideRight.Control = BitBtn6
|
||||||
AnchorSideBottom.Control = cbShowCaption
|
AnchorSideBottom.Control = cbShowCaption
|
||||||
Left = 14
|
Left = 14
|
||||||
Height = 270
|
Height = 271
|
||||||
Top = 28
|
Top = 27
|
||||||
Width = 286
|
Width = 287
|
||||||
Anchors = [akTop, akLeft, akRight, akBottom]
|
Anchors = [akTop, akLeft, akRight, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
ItemHeight = 0
|
ItemHeight = 0
|
||||||
OnClick = ListBtnAvaliableClick
|
OnClick = ListBtnAvaliableClick
|
||||||
OnDrawItem = ListBox1DrawItem
|
OnDrawItem = ListBox1DrawItem
|
||||||
ScrollWidth = 284
|
ScrollWidth = 285
|
||||||
Style = lbOwnerDrawFixed
|
Style = lbOwnerDrawFixed
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
TopIndex = -1
|
TopIndex = -1
|
||||||
@ -191,7 +187,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
Left = 6
|
Left = 6
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 304
|
Top = 304
|
||||||
Width = 111
|
Width = 105
|
||||||
Anchors = [akLeft, akBottom]
|
Anchors = [akLeft, akBottom]
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Show caption'
|
Caption = 'Show caption'
|
||||||
@ -210,7 +206,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
Left = 6
|
Left = 6
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 163
|
Top = 163
|
||||||
Width = 88
|
Width = 82
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Show hint'
|
Caption = 'Show hint'
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -222,7 +218,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
Left = 6
|
Left = 6
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 135
|
Top = 135
|
||||||
Width = 100
|
Width = 94
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Transparent'
|
Caption = 'Transparent'
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -234,7 +230,7 @@ object ToolPanelSetupForm: TToolPanelSetupForm
|
|||||||
Left = 6
|
Left = 6
|
||||||
Height = 22
|
Height = 22
|
||||||
Top = 107
|
Top = 107
|
||||||
Width = 101
|
Width = 93
|
||||||
BorderSpacing.Around = 6
|
BorderSpacing.Around = 6
|
||||||
Caption = 'Flat buttons'
|
Caption = 'Flat buttons'
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
|
Reference in New Issue
Block a user