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