You've already forked lazarus-ccr
fix error in rxdbgrid title draw
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@881 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
BIN
components/rx/Demos/RxDBGrid/RxDBGridDemo.ico
Normal file
BIN
components/rx/Demos/RxDBGrid/RxDBGridDemo.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 766 B |
@ -8,12 +8,19 @@
|
||||
</Flags>
|
||||
<MainUnit Value="0"/>
|
||||
<TargetFileExt Value=".exe"/>
|
||||
<Title Value="RxDBGrid demo"/>
|
||||
<Icon Value="0"/>
|
||||
<UseXPManifest Value="True"/>
|
||||
<ActiveEditorIndexAtStart Value="0"/>
|
||||
</General>
|
||||
<VersionInfo>
|
||||
<ProjectVersion Value=""/>
|
||||
<Language Value=""/>
|
||||
<CharSet Value=""/>
|
||||
<UseVersionInfo Value="True"/>
|
||||
<CurrentVersionNr Value="3"/>
|
||||
<CurrentMajorRevNr Value="1"/>
|
||||
<CurrentMinorRevNr Value="1"/>
|
||||
<ProjectVersion Value="3.1.1.0"/>
|
||||
<FileDescription Value="Demo application from RXFPC library"/>
|
||||
<LegalCopyright Value="Lagunov Aleksey, GPL 2"/>
|
||||
</VersionInfo>
|
||||
<PublishOptions>
|
||||
<Version Value="2"/>
|
||||
@ -40,25 +47,25 @@
|
||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||
</Item3>
|
||||
</RequiredPackages>
|
||||
<Units Count="10">
|
||||
<Units Count="14">
|
||||
<Unit0>
|
||||
<Filename Value="RxDBGridDemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<UnitName Value="RxDBGridDemo"/>
|
||||
<CursorPos X="3" Y="11"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="24"/>
|
||||
<UsageCount Value="26"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<ComponentName Value="RxDBGridMainForm"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
<ComponentName Value="RxDBGridMainForm"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="RxDBGridMainUnit"/>
|
||||
<CursorPos X="24" Y="53"/>
|
||||
<TopLine Value="127"/>
|
||||
<CursorPos X="26" Y="118"/>
|
||||
<TopLine Value="77"/>
|
||||
<EditorIndex Value="0"/>
|
||||
<UsageCount Value="24"/>
|
||||
<UsageCount Value="26"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit1>
|
||||
<Unit2>
|
||||
@ -84,11 +91,11 @@
|
||||
<Unit5>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<UnitName Value="rxdbgrid"/>
|
||||
<CursorPos X="13" Y="626"/>
|
||||
<TopLine Value="608"/>
|
||||
<CursorPos X="6" Y="467"/>
|
||||
<TopLine Value="462"/>
|
||||
<UsageCount Value="12"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="3" Y="1444" ID="1"/>
|
||||
<Item0 X="3" Y="1446" ID="1"/>
|
||||
</Bookmarks>
|
||||
</Unit5>
|
||||
<Unit6>
|
||||
@ -117,20 +124,40 @@
|
||||
<UnitName Value="rxpopupunit"/>
|
||||
<CursorPos X="15" Y="249"/>
|
||||
<TopLine Value="246"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit9>
|
||||
<Unit10>
|
||||
<Filename Value="../../../../lcl/include/wincontrol.inc"/>
|
||||
<CursorPos X="1" Y="7236"/>
|
||||
<TopLine Value="7217"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit10>
|
||||
<Unit11>
|
||||
<Filename Value="../../../../lcl/include/control.inc"/>
|
||||
<CursorPos X="1" Y="1"/>
|
||||
<TopLine Value="1"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit11>
|
||||
<Unit12>
|
||||
<Filename Value="../../../../lcl/lclmessageglue.pas"/>
|
||||
<UnitName Value="LCLMessageGlue"/>
|
||||
<CursorPos X="46" Y="96"/>
|
||||
<TopLine Value="92"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit12>
|
||||
<Unit13>
|
||||
<Filename Value="../../../../lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<CursorPos X="60" Y="1798"/>
|
||||
<TopLine Value="1779"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit13>
|
||||
</Units>
|
||||
<JumpHistory Count="2" HistoryIndex="1">
|
||||
<JumpHistory Count="1" HistoryIndex="0">
|
||||
<Position1>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="52" Column="18" TopLine="9"/>
|
||||
<Caret Line="31" Column="22" TopLine="11"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
<Caret Line="15" Column="4" TopLine="9"/>
|
||||
</Position2>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -8,9 +8,14 @@ uses
|
||||
{$ENDIF}{$ENDIF}
|
||||
Interfaces, // this includes the LCL widgetset
|
||||
Forms,
|
||||
LResources,
|
||||
RxDBGridMainUnit;
|
||||
|
||||
{$IFDEF WINDOWS}{$R RxDBGridDemo.rc}{$ENDIF}
|
||||
|
||||
begin
|
||||
Application.Title:='RxDBGrid demo';
|
||||
{$I RxDBGridDemo.lrs}
|
||||
Application.Initialize;
|
||||
Application.CreateForm(TRxDBGridMainForm, RxDBGridMainForm);
|
||||
Application.Run;
|
||||
|
29
components/rx/Demos/RxDBGrid/RxDBGridDemo.lrs
Normal file
29
components/rx/Demos/RxDBGrid/RxDBGridDemo.lrs
Normal file
@ -0,0 +1,29 @@
|
||||
LazarusResources.Add('MAINICON','ICO',[
|
||||
#0#0#1#0#1#0' '#4#0#0#0#0#0#232#2#0#0#22#0#0#0'('#0#0#0' '#0#0#0'@'#0#0#0#1#0
|
||||
+#4#0#0#0#0#0#0#2#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#128#0#0#128
|
||||
+#0#0#0#128#128#0#128#0#0#0#128#0#128#0#128#128#0#0#128#128#128#0#192#192#192
|
||||
+#0#0#0#255#0#0#255#0#0#0#255#255#0#255#0#0#0#255#0#255#0#255#255#0#0#255#255
|
||||
+#255#0#0#0#0#0#0#0#0#7'wp'#0#0#0#0#0#0#0#0#0#0#0#0'w'#0#0'pw'#0#0#0#0#0#0#0#0
|
||||
+#0#0#0#7#6'`p'#7'p'#0#0#0#0#0#0#0#0#7#6'`'#6'`'#6'`pp'#0#0#0#0#0#0#0#7#6'fff'
|
||||
+'f`pw'#0#0#0#0#0#0#0'`'#6'ffff`'#6#7'p'#0#0#0#0#0#6'ffn'#238#238#230'ff`'#0#0
|
||||
+#0#0#0#0'pfn'#232#136#136#142#230'f'#7'w'#0#0#0#0#0#0'f'#8#136#136#136#136
|
||||
+#142'f'#0#7'p'#0#0#0#6'f`'#248#136#136#136#136#136#230'f`p'#0#0#0#6'f`'#143
|
||||
+#136#136#136#136#136#230'f`'#0#0#0#0'pf'#8#248#248#136#136#136#136#142'f'#7
|
||||
+'w'#0#0#0#0'f'#8#143#143#128#8#136#136#142'f'#0#7#0#0#0'ff'#8#136#248#0#0#136
|
||||
+#136#142'ff'#7#0#0#0'ff'#8#136#143#7#0#136#136#142'ff'#7#0#0#0#0'f'#8#136#136
|
||||
+#128#8#136#136#142'f'#0#0#0#0#0#0'f'#8#136#136#136#143#136#136#142'f'#7'p'#0
|
||||
+#0#0#6'f`'#136#136#136#248#248#136#230'f`p'#0#0#0#6'f`'#136#136#136#143#143
|
||||
+#136#230'f`'#0#0#0#0#0#0'f'#8#136#136#136#248#142'f'#0#0#0#0#0#0#0#0'f`'#8
|
||||
+#136#136#128#6'f'#7'p'#0#0#0'ww'#6'ff`'#0#0#6'ff`'#0#0#0#0#0#0#0'`'#6'ffff`'
|
||||
+#6#0'ww'#0#8#136#135#0#8#6'ffff`'#128#0#0#7'p'#0#0#136'w'#0#0#0#0#0#0#0#0#7
|
||||
+'wpw'#0#0#8#136'wwwwwwwwx'#0#135#7#0#0#0#136#136#136#136#136#136#136#136#136
|
||||
+#128#0#8#7#0#0#0#136#136#136#136#136#136#136#136#136#128'p'#8#7#7'w'#8#136
|
||||
+#255#255#255#255#255#255#255#255#248#0#143#0#0#0#136#255#0#0#0#0#0#0#0#0#15
|
||||
+#255#240#0#15#255#255#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0#0
|
||||
+#0#255#254#31#255#255#240#19#255#255#224#1#255#255#128#1''#255#0#0'?'#254#0
|
||||
+#0#31#252#0#0'?'#252#0#0#15#248#0#0#7#240#0#0#7#240#0#0#15#240#0#0#3#224#0#0
|
||||
+#3#224#1#128#3#224#0#128#3#224#0#0#7#248#0#0#7#240#0#0#7#240#0#0#15#248#0#0
|
||||
+#31#254#0#0#31#192#0#0'?'#130#0#0'C'#0#0#0#129#0#0#0#0#240#0#0#0#248#0#0'0'
|
||||
+#248#0#0#16#128#0#0#1#0#0#0#3#0#255#255#135#131#255#255#255
|
||||
]);
|
||||
|
17
components/rx/Demos/RxDBGrid/RxDBGridDemo.manifest
Normal file
17
components/rx/Demos/RxDBGrid/RxDBGridDemo.manifest
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||
<assemblyIdentity version="1.0.0.0" processorArchitecture="*" name="CompanyName.ProductName.YourApp" type="win32"/>
|
||||
<description>Your application description here.</description>
|
||||
<dependency>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*"/>
|
||||
</dependentAssembly>
|
||||
</dependency>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level="asInvoker" uiAccess="false"/>
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
33
components/rx/Demos/RxDBGrid/RxDBGridDemo.rc
Normal file
33
components/rx/Demos/RxDBGrid/RxDBGridDemo.rc
Normal file
@ -0,0 +1,33 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 3,1,1,0
|
||||
PRODUCTVERSION 3,1,1,0
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "040904E4"
|
||||
{
|
||||
VALUE "Comments", "\000"
|
||||
VALUE "CompanyName", "\000"
|
||||
VALUE "FileDescription", "Demo application from RXFPC library\000"
|
||||
VALUE "FileVersion", "3.1.1.0\000"
|
||||
VALUE "InternalName", "\000"
|
||||
VALUE "LegalCopyright", "Lagunov Aleksey, GPL 2\000"
|
||||
VALUE "LegalTrademarks", "\000"
|
||||
VALUE "OriginalFilename", "\000"
|
||||
VALUE "ProductName", "\000"
|
||||
VALUE "ProductVersion", "3.1.1.0\000"
|
||||
}
|
||||
}
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0409, 0x04E4
|
||||
}
|
||||
}
|
||||
|
||||
#define RT_MANIFEST 24
|
||||
#define CREATEPROCESS_MANIFEST_RESOURCE_ID 1
|
||||
#define ISOLATIONAWARE_MANIFEST_RESOURCE_ID 2
|
||||
#define ISOLATIONAWARE_NOSTATICIMPORT_MANIFEST_RESOURCE_ID 3
|
||||
|
||||
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "RxDBGridDemo.manifest"
|
||||
MAINICON ICON "RxDBGridDemo.ico"
|
@ -1,7 +1,7 @@
|
||||
object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Left = 299
|
||||
Left = 263
|
||||
Height = 582
|
||||
Top = 161
|
||||
Top = 219
|
||||
Width = 969
|
||||
ActiveControl = Panel1
|
||||
Caption = 'RxDBGrid Demo (ver 3) ...'
|
||||
@ -14,8 +14,8 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Height = 533
|
||||
Top = 49
|
||||
Width = 969
|
||||
TitleButtons = False
|
||||
AutoSort = False
|
||||
TitleButtons = True
|
||||
AutoSort = True
|
||||
Columns = <
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
@ -29,16 +29,6 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Filter.Color = clLime
|
||||
Filter.ItemIndex = -1
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'Software Name'
|
||||
Title.Orientation = toHorizontal
|
||||
Width = 350
|
||||
FieldName = 'NAME'
|
||||
Filter.DropDownRows = 0
|
||||
Filter.Color = clLime
|
||||
Filter.ItemIndex = -1
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Orientation = toHorizontal
|
||||
@ -50,7 +40,17 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'Cost'
|
||||
Title.Caption = 'Software|Name'
|
||||
Title.Orientation = toHorizontal
|
||||
Width = 350
|
||||
FieldName = 'NAME'
|
||||
Filter.DropDownRows = 0
|
||||
Filter.Color = clLime
|
||||
Filter.ItemIndex = -1
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'Software|Cost'
|
||||
Title.Orientation = toHorizontal
|
||||
Width = 90
|
||||
FieldName = 'PRICE'
|
||||
@ -65,7 +65,7 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
end
|
||||
item
|
||||
Title.Alignment = taCenter
|
||||
Title.Caption = 'Date Present'
|
||||
Title.Caption = 'Software|Date Present'
|
||||
Title.Orientation = toHorizontal
|
||||
Width = 100
|
||||
FieldName = 'Date_Present'
|
||||
@ -89,10 +89,11 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
SelectedColor = clHighlight
|
||||
GridLineStyle = psSolid
|
||||
DataSource = Datasource1
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiselect]
|
||||
Options = [dgEditing, dgTitles, dgIndicator, dgColumnResize, dgColumnMove, dgColLines, dgRowLines, dgTabs, dgAlwaysShowSelection, dgConfirmDelete, dgCancelOnExit, dgMultiselect, dgHeaderPushedLook]
|
||||
ParentColor = False
|
||||
PopupMenu = PopupMenu1
|
||||
TabOrder = 0
|
||||
TitleStyle = tsNative
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
@ -137,9 +138,9 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideTop.Control = Button1
|
||||
AnchorSideTop.Side = asrCenter
|
||||
Left = 275
|
||||
Height = 22
|
||||
Top = 13
|
||||
Width = 81
|
||||
Height = 21
|
||||
Top = 14
|
||||
Width = 80
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'Use filter'
|
||||
OnChange = CheckBox1Change
|
||||
@ -288,17 +289,14 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
top = 197
|
||||
object actCalcTotal: TAction
|
||||
Caption = 'Calc total...'
|
||||
DisableIfNoHandler = True
|
||||
OnExecute = actCalcTotalExecute
|
||||
end
|
||||
object actOptimizeColumnsWidthAll: TAction
|
||||
Caption = 'Optimize width for all...'
|
||||
DisableIfNoHandler = True
|
||||
OnExecute = actOptimizeColumnsWidthAllExecute
|
||||
end
|
||||
object actOptimizeWidthCol1: TAction
|
||||
Caption = 'Optimize width...'
|
||||
DisableIfNoHandler = True
|
||||
OnExecute = actOptimizeWidthCol1Execute
|
||||
end
|
||||
end
|
||||
|
@ -1,110 +1,110 @@
|
||||
{ ��� - ���� ��������, ������������� ��������� lazarus }
|
||||
|
||||
LazarusResources.Add('TRxDBGridMainForm','FORMDATA',[
|
||||
'TPF0'#17'TRxDBGridMainForm'#16'RxDBGridMainForm'#4'Left'#3'+'#1#6'Height'#3
|
||||
+'F'#2#3'Top'#3#161#0#5'Width'#3#201#3#13'ActiveControl'#7#6'Panel1'#7'Captio'
|
||||
+'n'#6#26'RxDBGrid Demo (ver 3) ...'#12'ClientHeight'#3'F'#2#11'ClientWidth'
|
||||
+#3#201#3#8'OnCreate'#7#10'FormCreate'#10'LCLVersion'#6#6'0.9.27'#0#9'TRxDBGr'
|
||||
+'id'#9'RxDBGrid1'#4'Left'#2#0#6'Height'#3#21#2#3'Top'#2'1'#5'Width'#3#201#3
|
||||
+#12'TitleButtons'#8#8'AutoSort'#8#7'Columns'#14#1#15'Title.Alignment'#7#8'ta'
|
||||
+'Center'#13'Title.Caption'#6#4'Code'#17'Title.Orientation'#7#12'toHorizontal'
|
||||
+#9'FieldName'#6#2'ID'#16'Footer.Alignment'#7#14'taRightJustify'#20'Footer.Di'
|
||||
+'splayFormat'#6#9'Count: %d'#16'Footer.ValueType'#7#8'fvtCount'#19'Filter.Dr'
|
||||
+'opDownRows'#2#0#12'Filter.Color'#7#6'clLime'#16'Filter.ItemIndex'#2#255#0#1
|
||||
+#15'Title.Alignment'#7#8'taCenter'#13'Title.Caption'#6#13'Software Name'#17
|
||||
+'Title.Orientation'#7#12'toHorizontal'#5'Width'#3'^'#1#9'FieldName'#6#4'NAME'
|
||||
+#19'Filter.DropDownRows'#2#0#12'Filter.Color'#7#6'clLime'#16'Filter.ItemInde'
|
||||
+'x'#2#255#0#1#15'Title.Alignment'#7#8'taCenter'#17'Title.Orientation'#7#12't'
|
||||
+'oHorizontal'#5'Width'#3#150#0#9'FieldName'#6#9'Developer'#19'Filter.DropDow'
|
||||
+'nRows'#2#0#12'Filter.Color'#7#6'clLime'#16'Filter.ItemIndex'#2#255#0#1#15'T'
|
||||
+'itle.Alignment'#7#8'taCenter'#13'Title.Caption'#6#4'Cost'#17'Title.Orientat'
|
||||
+'ion'#7#12'toHorizontal'#5'Width'#2'Z'#9'FieldName'#6#5'PRICE'#13'DisplayFor'
|
||||
+'mat'#6#8'#,##0.00'#16'Footer.Alignment'#7#14'taRightJustify'#20'Footer.Disp'
|
||||
+'layFormat'#6#8'#,##0.00'#16'Footer.FieldName'#6#5'PRICE'#16'Footer.ValueTyp'
|
||||
+'e'#7#6'fvtSum'#19'Filter.DropDownRows'#2#0#12'Filter.Color'#7#6'clLime'#16
|
||||
+'Filter.ItemIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCenter'#13'Title.Capt'
|
||||
+'ion'#6#12'Date Present'#17'Title.Orientation'#7#12'toHorizontal'#5'Width'#2
|
||||
+'d'#9'FieldName'#6#12'Date_Present'#19'Filter.DropDownRows'#2#0#16'Filter.It'
|
||||
+'emIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCenter'#17'Title.Orientation'#7
|
||||
+#12'toHorizontal'#5'Width'#3#150#0#9'FieldName'#6#12'DEVELOPER_ID'#19'Filter'
|
||||
+'.DropDownRows'#2#0#16'Filter.ItemIndex'#2#255#0#0#9'OptionsRx'#11#13'rdgFoo'
|
||||
+'terRows'#0#11'FooterColor'#7#8'clYellow'#14'FooterRowCount'#2#1#9'OnFiltred'
|
||||
+#7#16'RxDBGrid1Filtred'#5'Align'#7#8'alClient'#10'FocusColor'#7#5'clRed'#13
|
||||
+'SelectedColor'#7#11'clHighlight'#13'GridLineStyle'#7#7'psSolid'#10'DataSour'
|
||||
+'ce'#7#11'Datasource1'#7'Options'#11#9'dgEditing'#8'dgTitles'#11'dgIndicator'
|
||||
+#14'dgColumnResize'#12'dgColumnMove'#10'dgColLines'#10'dgRowLines'#6'dgTabs'
|
||||
+#21'dgAlwaysShowSelection'#15'dgConfirmDelete'#14'dgCancelOnExit'#13'dgMulti'
|
||||
+'select'#0#11'ParentColor'#8#9'PopupMenu'#7#10'PopupMenu1'#8'TabOrder'#2#0#0
|
||||
+#0#6'TPanel'#6'Panel1'#4'Left'#2#0#6'Height'#2'1'#3'Top'#2#0#5'Width'#3#201#3
|
||||
+#5'Align'#7#5'alTop'#8'AutoSize'#9#12'ClientHeight'#2'1'#11'ClientWidth'#3
|
||||
+#201#3#8'TabOrder'#2#1#0#7'TButton'#7'Button1'#22'AnchorSideLeft.Control'#7#6
|
||||
+'Panel1'#21'AnchorSideTop.Control'#7#6'Panel1'#4'Left'#2#6#6'Height'#2'%'#3
|
||||
+'Top'#2#6#5'Width'#2'\'#6'Action'#7#12'actCalcTotal'#8'AutoSize'#9#20'Border'
|
||||
+'Spacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#0#0#0#7
|
||||
+'TButton'#7'Button2'#22'AnchorSideLeft.Control'#7#7'Button1'#19'AnchorSideLe'
|
||||
+'ft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7#6'Panel1'#4'Left'#2'h'#6
|
||||
+'Height'#2'%'#3'Top'#2#6#5'Width'#3#165#0#6'Action'#7#26'actOptimizeColumnsW'
|
||||
+'idthAll'#8'AutoSize'#9#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerB'
|
||||
+'order'#2#4#8'TabOrder'#2#1#0#0#9'TCheckBox'#9'CheckBox1'#22'AnchorSideLeft.'
|
||||
+'Control'#7#7'Button2'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideT'
|
||||
+'op.Control'#7#7'Button1'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#19
|
||||
+#1#6'Height'#2#22#3'Top'#2#13#5'Width'#2'Q'#18'BorderSpacing.Left'#2#6#7'Cap'
|
||||
+'tion'#6#10'Use filter'#8'OnChange'#7#15'CheckBox1Change'#8'TabOrder'#2#2#0#0
|
||||
+#0#13'TRxMemoryData'#13'RxMemoryData1'#14'AutoCalcFields'#8#9'FieldDefs'#14#1
|
||||
+#4'Name'#6#2'ID'#8'DataType'#7#9'ftInteger'#9'Precision'#2#255#4'Size'#2#7#0
|
||||
+#1#4'Name'#6#4'NAME'#8'DataType'#7#8'ftString'#9'Precision'#2#255#4'Size'#3
|
||||
+#150#0#0#1#4'Name'#6#5'PRICE'#8'DataType'#7#7'ftFloat'#9'Precision'#2#2#4'Si'
|
||||
+'ze'#2#12#0#1#4'Name'#6#9'Developer'#8'DataType'#7#8'ftString'#9'Precision'#2
|
||||
+#255#4'Size'#3#150#0#0#1#4'Name'#6#12'Date_Present'#8'DataType'#7#6'ftDate'#9
|
||||
+'Precision'#2#0#4'Size'#2#0#0#1#4'Name'#6#12'DEVELOPER_ID'#8'DataType'#7#9'f'
|
||||
+'tInteger'#9'Precision'#2#0#4'Size'#2#0#0#0#16'OnFilterRecordEx'#7#27'RxMemo'
|
||||
+'ryData1FilterRecordEx'#4'left'#3#152#0#3'top'#3#8#1#0#13'TLongintField'#16
|
||||
+'RxMemoryData1ID1'#12'DisplayWidth'#2#10#9'FieldKind'#7#6'fkData'#9'FieldNam'
|
||||
+'e'#6#2'ID'#5'Index'#2#0#11'LookupCache'#8#13'ProviderFlags'#11#10'pfInUpdat'
|
||||
+'e'#9'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#0#0#12'TStringField'#18'RxMem'
|
||||
+'oryData1NAME1'#12'DisplayWidth'#3#150#0#9'FieldKind'#7#6'fkData'#9'FieldNam'
|
||||
+'e'#6#4'NAME'#5'Index'#2#1#11'LookupCache'#8#13'ProviderFlags'#11#10'pfInUpd'
|
||||
+'ate'#9'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#4'Size'#3#150#0#0#0#11'TFlo'
|
||||
,'atField'#19'RxMemoryData1PRICE1'#12'DisplayWidth'#2#10#9'FieldKind'#7#6'fkD'
|
||||
+'ata'#9'FieldName'#6#5'PRICE'#5'Index'#2#2#11'LookupCache'#8#13'ProviderFlag'
|
||||
+'s'#11#10'pfInUpdate'#9'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#13'DisplayF'
|
||||
+'ormat'#6#8'#,##0.00'#8'MaxValue'#5#0#0#0#0#0#0#0#0#0#0#8'MinValue'#5#0#0#0#0
|
||||
+#0#0#0#0#0#0#9'Precision'#2#2#0#0#12'TStringField'#23'RxMemoryData1Developer'
|
||||
+'1'#12'DisplayWidth'#3#150#0#9'FieldKind'#7#6'fkData'#9'FieldName'#6#9'Devel'
|
||||
+'oper'#5'Index'#2#3#11'LookupCache'#8#13'ProviderFlags'#11#10'pfInUpdate'#9
|
||||
+'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#4'Size'#3#150#0#0#0#10'TDateField'
|
||||
+#26'RxMemoryData1Date_Present1'#12'DisplayWidth'#2#10#9'FieldKind'#7#6'fkDat'
|
||||
+'a'#9'FieldName'#6#12'Date_Present'#5'Index'#2#4#11'LookupCache'#8#13'Provid'
|
||||
+'erFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#0#0#13
|
||||
+'TLongintField'#26'RxMemoryData1DEVELOPER_ID1'#12'DisplayWidth'#2#10#9'Field'
|
||||
+'Kind'#7#6'fkData'#9'FieldName'#6#12'DEVELOPER_ID'#5'Index'#2#5#9'KeyFields'
|
||||
+#6#12'DEVELOPER_ID'#11'LookupCache'#8#13'LookupDataSet'#7#13'RxMemoryData2'
|
||||
+#15'LookupKeyFields'#6#12'DEVELOPER_ID'#17'LookupResultField'#6#14'DEVELOPER'
|
||||
+'_NAME'#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#8'ReadOnly'#8#8'R'
|
||||
+'equired'#8#0#0#0#11'TDatasource'#11'Datasource1'#7'DataSet'#7#13'RxMemoryDa'
|
||||
+'ta1'#4'left'#2'x'#3'top'#3#8#1#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#3
|
||||
+#152#0#3'top'#3#197#0#0#9'TMenuItem'#9'MenuItem1'#6'Action'#7#20'actOptimize'
|
||||
+'WidthCol1'#7'OnClick'#7#27'actOptimizeWidthCol1Execute'#0#0#9'TMenuItem'#9
|
||||
+'MenuItem2'#7'Caption'#6#1'-'#0#0#9'TMenuItem'#9'MenuItem4'#6'Action'#7#12'a'
|
||||
+'ctCalcTotal'#7'OnClick'#7#19'actCalcTotalExecute'#0#0#9'TMenuItem'#9'MenuIt'
|
||||
+'em3'#6'Action'#7#26'actOptimizeColumnsWidthAll'#7'OnClick'#7'!actOptimizeCo'
|
||||
+'lumnsWidthAllExecute'#0#0#0#11'TActionList'#11'ActionList1'#4'left'#3#206#0
|
||||
+#3'top'#3#197#0#0#7'TAction'#12'actCalcTotal'#7'Caption'#6#13'Calc total...'
|
||||
+#18'DisableIfNoHandler'#9#9'OnExecute'#7#19'actCalcTotalExecute'#0#0#7'TActi'
|
||||
+'on'#26'actOptimizeColumnsWidthAll'#7'Caption'#6#25'Optimize width for all..'
|
||||
+'.'#18'DisableIfNoHandler'#9#9'OnExecute'#7'!actOptimizeColumnsWidthAllExecu'
|
||||
+'te'#0#0#7'TAction'#20'actOptimizeWidthCol1'#7'Caption'#6#17'Optimize width.'
|
||||
+'..'#18'DisableIfNoHandler'#9#9'OnExecute'#7#27'actOptimizeWidthCol1Execute'
|
||||
+#0#0#0#11'TDatasource'#11'Datasource2'#7'DataSet'#7#13'RxMemoryData2'#4'left'
|
||||
+#3#207#0#3'top'#3#8#1#0#0#13'TRxMemoryData'#13'RxMemoryData2'#14'AutoCalcFie'
|
||||
+'lds'#8#9'FieldDefs'#14#1#4'Name'#6#12'DEVELOPER_ID'#8'DataType'#7#9'ftInteg'
|
||||
+'er'#9'Precision'#2#0#4'Size'#2#0#0#1#4'Name'#6#14'DEVELOPER_NAME'#8'DataTyp'
|
||||
+'e'#7#8'ftString'#9'Precision'#2#0#4'Size'#3#130#0#0#0#4'left'#3#240#0#3'top'
|
||||
+#3#8#1#0#13'TLongintField'#26'RxMemoryData2DEVELOPER_ID1'#12'DisplayWidth'#2
|
||||
+#10#9'FieldKind'#7#6'fkData'#9'FieldName'#6#12'DEVELOPER_ID'#5'Index'#2#0#11
|
||||
'TPF0'#17'TRxDBGridMainForm'#16'RxDBGridMainForm'#4'Left'#3#7#1#6'Height'#3'F'
|
||||
+#2#3'Top'#3#219#0#5'Width'#3#201#3#13'ActiveControl'#7#6'Panel1'#7'Caption'#6
|
||||
+#26'RxDBGrid Demo (ver 3) ...'#12'ClientHeight'#3'F'#2#11'ClientWidth'#3#201
|
||||
+#3#8'OnCreate'#7#10'FormCreate'#10'LCLVersion'#6#6'0.9.27'#0#9'TRxDBGrid'#9
|
||||
+'RxDBGrid1'#4'Left'#2#0#6'Height'#3#21#2#3'Top'#2'1'#5'Width'#3#201#3#12'Tit'
|
||||
+'leButtons'#9#8'AutoSort'#9#7'Columns'#14#1#15'Title.Alignment'#7#8'taCenter'
|
||||
+#13'Title.Caption'#6#4'Code'#17'Title.Orientation'#7#12'toHorizontal'#9'Fiel'
|
||||
+'dName'#6#2'ID'#16'Footer.Alignment'#7#14'taRightJustify'#20'Footer.DisplayF'
|
||||
+'ormat'#6#9'Count: %d'#16'Footer.ValueType'#7#8'fvtCount'#19'Filter.DropDown'
|
||||
+'Rows'#2#0#12'Filter.Color'#7#6'clLime'#16'Filter.ItemIndex'#2#255#0#1#15'Ti'
|
||||
+'tle.Alignment'#7#8'taCenter'#17'Title.Orientation'#7#12'toHorizontal'#5'Wid'
|
||||
+'th'#3#150#0#9'FieldName'#6#9'Developer'#19'Filter.DropDownRows'#2#0#12'Filt'
|
||||
+'er.Color'#7#6'clLime'#16'Filter.ItemIndex'#2#255#0#1#15'Title.Alignment'#7#8
|
||||
+'taCenter'#13'Title.Caption'#6#13'Software|Name'#17'Title.Orientation'#7#12
|
||||
+'toHorizontal'#5'Width'#3'^'#1#9'FieldName'#6#4'NAME'#19'Filter.DropDownRows'
|
||||
+#2#0#12'Filter.Color'#7#6'clLime'#16'Filter.ItemIndex'#2#255#0#1#15'Title.Al'
|
||||
+'ignment'#7#8'taCenter'#13'Title.Caption'#6#13'Software|Cost'#17'Title.Orien'
|
||||
+'tation'#7#12'toHorizontal'#5'Width'#2'Z'#9'FieldName'#6#5'PRICE'#13'Display'
|
||||
+'Format'#6#8'#,##0.00'#16'Footer.Alignment'#7#14'taRightJustify'#20'Footer.D'
|
||||
+'isplayFormat'#6#8'#,##0.00'#16'Footer.FieldName'#6#5'PRICE'#16'Footer.Value'
|
||||
+'Type'#7#6'fvtSum'#19'Filter.DropDownRows'#2#0#12'Filter.Color'#7#6'clLime'
|
||||
+#16'Filter.ItemIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCenter'#13'Title.C'
|
||||
+'aption'#6#21'Software|Date Present'#17'Title.Orientation'#7#12'toHorizontal'
|
||||
+#5'Width'#2'd'#9'FieldName'#6#12'Date_Present'#19'Filter.DropDownRows'#2#0#16
|
||||
+'Filter.ItemIndex'#2#255#0#1#15'Title.Alignment'#7#8'taCenter'#17'Title.Orie'
|
||||
+'ntation'#7#12'toHorizontal'#5'Width'#3#150#0#9'FieldName'#6#12'DEVELOPER_ID'
|
||||
+#19'Filter.DropDownRows'#2#0#16'Filter.ItemIndex'#2#255#0#0#9'OptionsRx'#11
|
||||
+#13'rdgFooterRows'#0#11'FooterColor'#7#8'clYellow'#14'FooterRowCount'#2#1#9
|
||||
+'OnFiltred'#7#16'RxDBGrid1Filtred'#5'Align'#7#8'alClient'#10'FocusColor'#7#5
|
||||
+'clRed'#13'SelectedColor'#7#11'clHighlight'#13'GridLineStyle'#7#7'psSolid'#10
|
||||
+'DataSource'#7#11'Datasource1'#7'Options'#11#9'dgEditing'#8'dgTitles'#11'dgI'
|
||||
+'ndicator'#14'dgColumnResize'#12'dgColumnMove'#10'dgColLines'#10'dgRowLines'
|
||||
+#6'dgTabs'#21'dgAlwaysShowSelection'#15'dgConfirmDelete'#14'dgCancelOnExit'
|
||||
+#13'dgMultiselect'#18'dgHeaderPushedLook'#0#11'ParentColor'#8#9'PopupMenu'#7
|
||||
+#10'PopupMenu1'#8'TabOrder'#2#0#10'TitleStyle'#7#8'tsNative'#0#0#6'TPanel'#6
|
||||
+'Panel1'#4'Left'#2#0#6'Height'#2'1'#3'Top'#2#0#5'Width'#3#201#3#5'Align'#7#5
|
||||
+'alTop'#8'AutoSize'#9#12'ClientHeight'#2'1'#11'ClientWidth'#3#201#3#8'TabOrd'
|
||||
+'er'#2#1#0#7'TButton'#7'Button1'#22'AnchorSideLeft.Control'#7#6'Panel1'#21'A'
|
||||
+'nchorSideTop.Control'#7#6'Panel1'#4'Left'#2#6#6'Height'#2'%'#3'Top'#2#6#5'W'
|
||||
+'idth'#2'\'#6'Action'#7#12'actCalcTotal'#8'AutoSize'#9#20'BorderSpacing.Arou'
|
||||
+'nd'#2#6#25'BorderSpacing.InnerBorder'#2#4#8'TabOrder'#2#0#0#0#7'TButton'#7
|
||||
+'Button2'#22'AnchorSideLeft.Control'#7#7'Button1'#19'AnchorSideLeft.Side'#7#9
|
||||
+'asrBottom'#21'AnchorSideTop.Control'#7#6'Panel1'#4'Left'#2'h'#6'Height'#2'%'
|
||||
+#3'Top'#2#6#5'Width'#3#165#0#6'Action'#7#26'actOptimizeColumnsWidthAll'#8'Au'
|
||||
+'toSize'#9#20'BorderSpacing.Around'#2#6#25'BorderSpacing.InnerBorder'#2#4#8
|
||||
+'TabOrder'#2#1#0#0#9'TCheckBox'#9'CheckBox1'#22'AnchorSideLeft.Control'#7#7
|
||||
+'Button2'#19'AnchorSideLeft.Side'#7#9'asrBottom'#21'AnchorSideTop.Control'#7
|
||||
+#7'Button1'#18'AnchorSideTop.Side'#7#9'asrCenter'#4'Left'#3#19#1#6'Height'#2
|
||||
+#21#3'Top'#2#14#5'Width'#2'P'#18'BorderSpacing.Left'#2#6#7'Caption'#6#10'Use'
|
||||
+' filter'#8'OnChange'#7#15'CheckBox1Change'#8'TabOrder'#2#2#0#0#0#13'TRxMemo'
|
||||
+'ryData'#13'RxMemoryData1'#14'AutoCalcFields'#8#9'FieldDefs'#14#1#4'Name'#6#2
|
||||
+'ID'#8'DataType'#7#9'ftInteger'#9'Precision'#2#255#4'Size'#2#7#0#1#4'Name'#6
|
||||
+#4'NAME'#8'DataType'#7#8'ftString'#9'Precision'#2#255#4'Size'#3#150#0#0#1#4
|
||||
+'Name'#6#5'PRICE'#8'DataType'#7#7'ftFloat'#9'Precision'#2#2#4'Size'#2#12#0#1
|
||||
+#4'Name'#6#9'Developer'#8'DataType'#7#8'ftString'#9'Precision'#2#255#4'Size'
|
||||
+#3#150#0#0#1#4'Name'#6#12'Date_Present'#8'DataType'#7#6'ftDate'#9'Precision'
|
||||
+#2#0#4'Size'#2#0#0#1#4'Name'#6#12'DEVELOPER_ID'#8'DataType'#7#9'ftInteger'#9
|
||||
+'Precision'#2#0#4'Size'#2#0#0#0#16'OnFilterRecordEx'#7#27'RxMemoryData1Filte'
|
||||
+'rRecordEx'#4'left'#3#152#0#3'top'#3#8#1#0#13'TLongintField'#16'RxMemoryData'
|
||||
+'1ID1'#12'DisplayWidth'#2#10#9'FieldKind'#7#6'fkData'#9'FieldName'#6#2'ID'#5
|
||||
+'Index'#2#0#11'LookupCache'#8#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWher'
|
||||
+'e'#0#8'ReadOnly'#8#8'Required'#8#0#0#12'TStringField'#18'RxMemoryData1NAME1'
|
||||
+#12'DisplayWidth'#3#150#0#9'FieldKind'#7#6'fkData'#9'FieldName'#6#4'NAME'#5
|
||||
+'Index'#2#1#11'LookupCache'#8#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWher'
|
||||
,'e'#0#8'ReadOnly'#8#8'Required'#8#4'Size'#3#150#0#0#0#11'TFloatField'#19'RxM'
|
||||
+'emoryData1PRICE1'#12'DisplayWidth'#2#10#9'FieldKind'#7#6'fkData'#9'FieldNam'
|
||||
+'e'#6#5'PRICE'#5'Index'#2#2#11'LookupCache'#8#13'ProviderFlags'#11#10'pfInUp'
|
||||
+'date'#9'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#13'DisplayFormat'#6#8'#,##'
|
||||
+'0.00'#8'MaxValue'#5#0#0#0#0#0#0#0#0#0#0#8'MinValue'#5#0#0#0#0#0#0#0#0#0#0#9
|
||||
+'Precision'#2#2#0#0#12'TStringField'#23'RxMemoryData1Developer1'#12'DisplayW'
|
||||
+'idth'#3#150#0#9'FieldKind'#7#6'fkData'#9'FieldName'#6#9'Developer'#5'Index'
|
||||
+#2#3#11'LookupCache'#8#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#8
|
||||
+'ReadOnly'#8#8'Required'#8#4'Size'#3#150#0#0#0#10'TDateField'#26'RxMemoryDat'
|
||||
+'a1Date_Present1'#12'DisplayWidth'#2#10#9'FieldKind'#7#6'fkData'#9'FieldName'
|
||||
+#6#12'Date_Present'#5'Index'#2#4#11'LookupCache'#8#13'ProviderFlags'#11#10'p'
|
||||
+'fInUpdate'#9'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#0#0#13'TLongintField'
|
||||
+#26'RxMemoryData1DEVELOPER_ID1'#12'DisplayWidth'#2#10#9'FieldKind'#7#6'fkDat'
|
||||
+'a'#9'FieldName'#6#12'DEVELOPER_ID'#5'Index'#2#5#9'KeyFields'#6#12'DEVELOPER'
|
||||
+'_ID'#11'LookupCache'#8#13'LookupDataSet'#7#13'RxMemoryData2'#15'LookupKeyFi'
|
||||
+'elds'#6#12'DEVELOPER_ID'#17'LookupResultField'#6#14'DEVELOPER_NAME'#13'Prov'
|
||||
+'iderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#0#0
|
||||
+#0#11'TDatasource'#11'Datasource1'#7'DataSet'#7#13'RxMemoryData1'#4'left'#2
|
||||
+'x'#3'top'#3#8#1#0#0#10'TPopupMenu'#10'PopupMenu1'#4'left'#3#152#0#3'top'#3
|
||||
+#197#0#0#9'TMenuItem'#9'MenuItem1'#6'Action'#7#20'actOptimizeWidthCol1'#7'On'
|
||||
+'Click'#7#27'actOptimizeWidthCol1Execute'#0#0#9'TMenuItem'#9'MenuItem2'#7'Ca'
|
||||
+'ption'#6#1'-'#0#0#9'TMenuItem'#9'MenuItem4'#6'Action'#7#12'actCalcTotal'#7
|
||||
+'OnClick'#7#19'actCalcTotalExecute'#0#0#9'TMenuItem'#9'MenuItem3'#6'Action'#7
|
||||
+#26'actOptimizeColumnsWidthAll'#7'OnClick'#7'!actOptimizeColumnsWidthAllExec'
|
||||
+'ute'#0#0#0#11'TActionList'#11'ActionList1'#4'left'#3#206#0#3'top'#3#197#0#0
|
||||
+#7'TAction'#12'actCalcTotal'#7'Caption'#6#13'Calc total...'#9'OnExecute'#7#19
|
||||
+'actCalcTotalExecute'#0#0#7'TAction'#26'actOptimizeColumnsWidthAll'#7'Captio'
|
||||
+'n'#6#25'Optimize width for all...'#9'OnExecute'#7'!actOptimizeColumnsWidthA'
|
||||
+'llExecute'#0#0#7'TAction'#20'actOptimizeWidthCol1'#7'Caption'#6#17'Optimize'
|
||||
+' width...'#9'OnExecute'#7#27'actOptimizeWidthCol1Execute'#0#0#0#11'TDatasou'
|
||||
+'rce'#11'Datasource2'#7'DataSet'#7#13'RxMemoryData2'#4'left'#3#207#0#3'top'#3
|
||||
+#8#1#0#0#13'TRxMemoryData'#13'RxMemoryData2'#14'AutoCalcFields'#8#9'FieldDef'
|
||||
+'s'#14#1#4'Name'#6#12'DEVELOPER_ID'#8'DataType'#7#9'ftInteger'#9'Precision'#2
|
||||
+#0#4'Size'#2#0#0#1#4'Name'#6#14'DEVELOPER_NAME'#8'DataType'#7#8'ftString'#9
|
||||
+'Precision'#2#0#4'Size'#3#130#0#0#0#4'left'#3#240#0#3'top'#3#8#1#0#13'TLongi'
|
||||
+'ntField'#26'RxMemoryData2DEVELOPER_ID1'#12'DisplayWidth'#2#10#9'FieldKind'#7
|
||||
+#6'fkData'#9'FieldName'#6#12'DEVELOPER_ID'#5'Index'#2#0#11'LookupCache'#8#13
|
||||
+'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8
|
||||
+#0#0#12'TStringField'#28'RxMemoryData2DEVELOPER_NAME1'#12'DisplayWidth'#3#130
|
||||
+#0#9'FieldKind'#7#6'fkData'#9'FieldName'#6#14'DEVELOPER_NAME'#5'Index'#2#1#11
|
||||
+'LookupCache'#8#13'ProviderFlags'#11#10'pfInUpdate'#9'pfInWhere'#0#8'ReadOnl'
|
||||
+'y'#8#8'Required'#8#0#0#12'TStringField'#28'RxMemoryData2DEVELOPER_NAME1'#12
|
||||
+'DisplayWidth'#3#130#0#9'FieldKind'#7#6'fkData'#9'FieldName'#6#14'DEVELOPER_'
|
||||
+'NAME'#5'Index'#2#1#11'LookupCache'#8#13'ProviderFlags'#11#10'pfInUpdate'#9
|
||||
+'pfInWhere'#0#8'ReadOnly'#8#8'Required'#8#4'Size'#3#130#0#0#0#0#0
|
||||
+'y'#8#8'Required'#8#4'Size'#3#130#0#0#0#0#0
|
||||
]);
|
||||
|
@ -57,6 +57,7 @@ var
|
||||
RxDBGridMainForm: TRxDBGridMainForm;
|
||||
|
||||
implementation
|
||||
uses rxsortmemds;
|
||||
|
||||
{ TRxDBGridMainForm }
|
||||
|
||||
|
@ -20,6 +20,8 @@
|
||||
+ Добавлен пример для использования автоматической сортировки в RxDBGrid
|
||||
- Исправлена сортировка при использовании TRxMemDataSet
|
||||
- Исправлена отрисова кнопки в ToolPanel при отрисовке с использованием текущей темы
|
||||
+ Реализована возможность объединения ячеек в заголовке таблицы
|
||||
(смотрите в демке на RxDBGrid)
|
||||
22.05.2008 - версия 2.0.0.136 (svn revision 100)
|
||||
+ У объекта TRxCustomDBLookupCombo введён контроль на CircularDataLink
|
||||
+ У объекта TRxCustomDBLookupCombo ускорена отрисовка данных
|
||||
|
@ -51,21 +51,31 @@ type
|
||||
end;
|
||||
TExDBGridSortEngineClass = class of TExDBGridSortEngine;
|
||||
|
||||
TMLCaptionItem = class
|
||||
Caption:string;
|
||||
Width:integer;
|
||||
Hegth:integer;
|
||||
Next:TMLCaptionItem;
|
||||
Prior:TMLCaptionItem;
|
||||
end;
|
||||
|
||||
{ TRxColumnTitle }
|
||||
TRxColumnTitle = class(TColumnTitle)
|
||||
private
|
||||
FHint: string;
|
||||
FOrientation: TTextOrientation;
|
||||
FShowHint: boolean;
|
||||
FMultiLines:TStringList;
|
||||
FCaptionLines:TFPList;
|
||||
function GetCaptionLinesCount: integer;
|
||||
procedure SetOrientation(const AValue: TTextOrientation);
|
||||
function MCountLines:integer;
|
||||
function MGetLine(ALine:integer):string;
|
||||
procedure ClearCaptionML;
|
||||
protected
|
||||
procedure SetCaption(const AValue: TCaption); override;
|
||||
public
|
||||
constructor Create(TheColumn: TGridColumn); override;
|
||||
destructor Destroy; override;
|
||||
property CaptionLinesCount:integer read GetCaptionLinesCount;
|
||||
function CaptionLine(ALine:integer):TMLCaptionItem;
|
||||
published
|
||||
property Orientation:TTextOrientation read FOrientation write SetOrientation;
|
||||
property Hint: string read FHint write FHint;
|
||||
@ -206,12 +216,11 @@ type
|
||||
FFooterRowCount: integer;
|
||||
FOnGetCellProps: TGetCellPropsEvent;
|
||||
FOptionsRx: TOptionsRx;
|
||||
FTitleLines: Integer;
|
||||
// FTitleLines: Integer;
|
||||
FAutoSort: boolean;
|
||||
FMarkerUp, FMarkerDown: TBitmap;
|
||||
FOnGetBtnParams: TGetBtnParamsEvent;
|
||||
FOnFiltred : TNotifyEvent;
|
||||
FTitleButtons: boolean;
|
||||
//auto sort support
|
||||
FSortField:TField;
|
||||
FSortOrder:TSortMarker;
|
||||
@ -234,6 +243,7 @@ type
|
||||
|
||||
function GetColumns: TRxDbGridColumns;
|
||||
function GetPropertyStorage: TCustomPropertyStorage;
|
||||
function GetTitleButtons: boolean;
|
||||
function IsColumnsStored: boolean;
|
||||
procedure SetAutoSort(const AValue: boolean);
|
||||
procedure SetColumns(const AValue: TRxDbGridColumns);
|
||||
@ -245,16 +255,19 @@ type
|
||||
procedure TrackButton(X, Y: Integer);
|
||||
procedure StopTracking;
|
||||
procedure CalcTitle;
|
||||
procedure ClearMLCaptionPointers;
|
||||
function getFilterRect(bRect : TRect):TRect;
|
||||
function getTitleRect(bRect : TRect):TRect;
|
||||
procedure OutCaptionCellText(aCol,aRow: Integer;const aRect: TRect; aState: TGridDrawState;const ACaption:string);
|
||||
procedure OutCaptionCellText90(aCol,aRow: Integer;const aRect: TRect; aState: TGridDrawState;const ACaption:string;const TextOrient:TTextOrientation);
|
||||
procedure OutCaptionSortMarker(const aRect: TRect; ASortMarker: TSortMarker);
|
||||
procedure OutCaptionMLCellText(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState; MLI:TMLCaptionItem);
|
||||
|
||||
//storage
|
||||
procedure OnIniSave(Sender: TObject);
|
||||
procedure OnIniLoad(Sender: TObject);
|
||||
protected
|
||||
{$IFDEF Win32}
|
||||
procedure CreateWnd; override;
|
||||
{$ENDIF}
|
||||
// procedure CreateWnd; override;
|
||||
function DatalinkActive:boolean;
|
||||
procedure DefaultDrawCellA(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState);
|
||||
procedure DefaultDrawTitle(aCol,aRow: Integer; aRect: TRect; aState: TGridDrawState);
|
||||
@ -273,6 +286,7 @@ type
|
||||
procedure DrawCellBitmap(RxColumn:TRxColumn; aRect: TRect; aState: TGridDrawState; AImageIndex:integer); virtual;
|
||||
procedure SetEditText(ACol, ARow: Longint; const Value: string); override;
|
||||
procedure CheckNewCachedSizes(var AGCache:TGridDataCache); override;
|
||||
procedure ColRowMoved(IsColumn: Boolean; FromIndex,ToIndex: Integer); override;
|
||||
procedure Paint;override;
|
||||
procedure UpdateActive;override;
|
||||
procedure UpdateData;override;
|
||||
@ -282,10 +296,11 @@ type
|
||||
procedure FFilterListEditorOnCloseUp(Sender: TObject);
|
||||
procedure InternalOptimizeColumnsWidth(AColList:TList);
|
||||
function IsDefaultRowHeightStored:boolean;
|
||||
function EditorByStyle(Style: TColumnButtonStyle): TWinControl; override;
|
||||
procedure VisualChange; override;
|
||||
public
|
||||
constructor Create(AOwner: TComponent); override;
|
||||
destructor Destroy; override;
|
||||
function EditorByStyle(Style: TColumnButtonStyle): TWinControl; override;
|
||||
procedure LayoutChanged; override;
|
||||
procedure ShowFindDialog;
|
||||
procedure ShowColumnsDialog;
|
||||
@ -304,7 +319,7 @@ type
|
||||
procedure UpdateTitleHight;
|
||||
published
|
||||
property OnGetBtnParams: TGetBtnParamsEvent read FOnGetBtnParams write FOnGetBtnParams;
|
||||
property TitleButtons: boolean read FTitleButtons write SetTitleButtons;
|
||||
property TitleButtons: boolean read GetTitleButtons write SetTitleButtons;
|
||||
property AutoSort:boolean read FAutoSort write SetAutoSort;
|
||||
property OnGetCellProps: TGetCellPropsEvent read FOnGetCellProps
|
||||
write FOnGetCellProps;
|
||||
@ -462,8 +477,8 @@ type
|
||||
procedure msg_GetValue(var Msg: TGridMessage); message GM_GETVALUE;
|
||||
procedure msg_SelectAll(var Msg: TGridMessage); message GM_SELECTALL;
|
||||
|
||||
procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); override;
|
||||
public
|
||||
// procedure SetBounds(aLeft, aTop, aWidth, aHeight: integer); override;
|
||||
procedure EditingDone; override;
|
||||
end;
|
||||
|
||||
@ -591,11 +606,13 @@ begin
|
||||
SelectAll;
|
||||
end;
|
||||
|
||||
procedure TRxDBGridDateEditor.SetBounds(aLeft, aTop, aWidth, aHeight: integer);
|
||||
{procedure TRxDBGridDateEditor.SetBounds(aLeft, aTop, aWidth, aHeight: integer);
|
||||
begin
|
||||
BeginUpdateBounds;
|
||||
Dec(aWidth, 25);
|
||||
inherited SetBounds(aLeft, aTop, aWidth, aHeight);
|
||||
end;
|
||||
EndUpdateBounds;
|
||||
end;}
|
||||
|
||||
procedure TRxDBGridDateEditor.EditingDone;
|
||||
begin
|
||||
@ -693,11 +710,11 @@ const
|
||||
DT_RIGHT or {DT_EXPANDTABS or }DT_NOPREFIX,
|
||||
DT_CENTER or {DT_EXPANDTABS or }DT_NOPREFIX);
|
||||
|
||||
TITLE_SUBHEADER = 2;
|
||||
{ TITLE_SUBHEADER = 2;
|
||||
TITLE_DEFAULT = 1;
|
||||
|
||||
const
|
||||
EdgeFlag: array[Boolean] of UINT = (BDR_RAISEDINNER, BDR_SUNKENINNER);
|
||||
EdgeFlag: array[Boolean] of UINT = (BDR_RAISEDINNER, BDR_SUNKENINNER);}
|
||||
|
||||
procedure WriteTextHeader(ACanvas: TCanvas; ARect: TRect; const Text: string;
|
||||
Alignment: TAlignment);
|
||||
@ -723,8 +740,10 @@ end;
|
||||
|
||||
procedure TRxDBGrid.SetTitleButtons(const AValue: boolean);
|
||||
begin
|
||||
if FTitleButtons=AValue then exit;
|
||||
FTitleButtons:=AValue;
|
||||
if AValue then
|
||||
Options:=Options + [dgHeaderPushedLook]
|
||||
else
|
||||
Options:=Options - [dgHeaderPushedLook];
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.SetAutoSort(const AValue: boolean);
|
||||
@ -756,6 +775,11 @@ begin
|
||||
Result:=FPropertyStorageLink.Storage;
|
||||
end;
|
||||
|
||||
function TRxDBGrid.GetTitleButtons: boolean;
|
||||
begin
|
||||
Result:=dgHeaderPushedLook in Options;
|
||||
end;
|
||||
|
||||
function TRxDBGrid.IsColumnsStored: boolean;
|
||||
begin
|
||||
result := TRxDbGridColumns(TCustomDrawGrid(Self).Columns).Enabled;
|
||||
@ -838,53 +862,91 @@ end;
|
||||
procedure TRxDBGrid.CalcTitle;
|
||||
var
|
||||
i, j:integer;
|
||||
H, H1, W, H2, W1:integer;
|
||||
rxCol:TRxColumn;
|
||||
rxTit:TRxColumnTitle;
|
||||
sCapt:string;
|
||||
H, H1, W, H2:integer;
|
||||
rxCol, rxColNext:TRxColumn;
|
||||
rxTit, rxTitleNext:TRxColumnTitle;
|
||||
MLRec1:TMLCaptionItem;
|
||||
MLRec2:TMLCaptionItem;
|
||||
begin
|
||||
H:=1;
|
||||
ClearMLCaptionPointers;
|
||||
for i:=0 to Columns.Count-1 do
|
||||
begin
|
||||
rxCol:=TRxColumn(Columns[i]);
|
||||
if rxCol.Visible then
|
||||
if Assigned(rxCol) and rxCol.Visible then
|
||||
begin
|
||||
rxTit:=TRxColumnTitle(rxCol.Title);
|
||||
if Assigned(rxTit) then
|
||||
begin
|
||||
if rxTit.Orientation in [toVertical270, toVertical90] then
|
||||
H:=Max((Canvas.TextWidth(Columns[i].Title.Caption)+ Canvas.TextWidth('W')) div DefaultRowHeight, H)
|
||||
else
|
||||
begin
|
||||
rxColNext:=nil;
|
||||
rxTitleNext:=nil;
|
||||
if i < Columns.Count-1 then
|
||||
begin
|
||||
rxColNext:=TRxColumn(Columns[i+1]);
|
||||
rxTitleNext:=TRxColumnTitle(rxColNext.Title);
|
||||
end;
|
||||
{ TODO -oalexs : Тут необходимо также обработать скрытые столбцы }
|
||||
{
|
||||
j:=i;
|
||||
while j < Columns.Count-1 then
|
||||
begin
|
||||
if
|
||||
inc(j);
|
||||
end;
|
||||
}
|
||||
|
||||
W:=Max(rxCol.Width-2, 1);
|
||||
if rxTit.MCountLines > 0 then
|
||||
if rxTit.CaptionLinesCount > 0 then
|
||||
begin
|
||||
H2:=0;
|
||||
H1:=0;
|
||||
for j:=0 to rxTit.MCountLines-1 do
|
||||
for j:=0 to rxTit.CaptionLinesCount-1 do
|
||||
begin
|
||||
sCapt:=rxTit.MGetLine(j);
|
||||
W1:=Canvas.TextWidth(sCapt)+2;
|
||||
MLRec1:=rxTit.CaptionLine(j);
|
||||
if Assigned(rxTitleNext) and (rxTitleNext.CaptionLinesCount>j) then
|
||||
begin
|
||||
MLRec2:=rxTitleNext.CaptionLine(j);
|
||||
if MLRec1.Caption = MLRec2.Caption then
|
||||
begin
|
||||
MLRec1.Next:=MLRec2;
|
||||
MLRec2.Prior:=MLRec1;
|
||||
end;
|
||||
end;
|
||||
|
||||
if W>W1 then
|
||||
MLRec1.Width:=Canvas.TextWidth(MLRec1.Caption)+2;
|
||||
|
||||
if W > MLRec1.Width then
|
||||
H2:=1
|
||||
else
|
||||
H2:=W1 div W + 1;
|
||||
H2:=MLRec1.Width div W + 1;
|
||||
|
||||
if H2>WordCount(sCapt, [' ']) then
|
||||
H2:=WordCount(sCapt, [' ']);
|
||||
if H2>WordCount(MLRec1.Caption, [' ']) then
|
||||
H2:=WordCount(MLRec1.Caption, [' ']);
|
||||
|
||||
H1:=H1+H2;
|
||||
end
|
||||
end
|
||||
else
|
||||
begin
|
||||
sCapt:=rxTit.Caption;
|
||||
|
||||
H1:=Max((Canvas.TextWidth(sCapt)+2) div W + 1, H);
|
||||
if H1>WordCount(sCapt, [' ']) then
|
||||
H1:=WordCount(sCapt, [' ']);
|
||||
H1:=Max((Canvas.TextWidth(rxTit.Caption)+2) div W + 1, H);
|
||||
if H1>WordCount(rxTit.Caption, [' ']) then
|
||||
H1:=WordCount(rxTit.Caption, [' ']);
|
||||
end;
|
||||
H:=Max(H1, H);
|
||||
end;
|
||||
|
||||
for j:=0 to rxTit.CaptionLinesCount-1 do
|
||||
begin
|
||||
MLRec1:=rxTit.CaptionLine(j);
|
||||
if MLRec1.Width < rxTit.Column.Width then
|
||||
MLRec1.Width:=rxTit.Column.Width;
|
||||
end;
|
||||
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
@ -897,6 +959,30 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.ClearMLCaptionPointers;
|
||||
var
|
||||
i, j:integer;
|
||||
rxCol:TRxColumn;
|
||||
rxTit:TRxColumnTitle;
|
||||
begin
|
||||
for i:=0 to Columns.Count-1 do
|
||||
begin
|
||||
rxCol:=TRxColumn(Columns[i]);
|
||||
if Assigned(rxCol) then
|
||||
begin
|
||||
rxTit:= TRxColumnTitle(rxCol.Title);
|
||||
if Assigned(rxTit) then
|
||||
begin
|
||||
for j:=0 to rxTit.CaptionLinesCount - 1 do
|
||||
begin
|
||||
rxTit.CaptionLine(j).Next:=nil;
|
||||
rxTit.CaptionLine(j).Prior:=nil;
|
||||
end;
|
||||
end
|
||||
end
|
||||
end;
|
||||
end;
|
||||
|
||||
function TRxDBGrid.getFilterRect(bRect: TRect): TRect;
|
||||
begin
|
||||
Result := bRect;
|
||||
@ -909,6 +995,67 @@ begin
|
||||
Result.Bottom := bRect.Bottom - DefaultRowHeight;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.OutCaptionCellText(aCol, aRow: Integer;const aRect: TRect;
|
||||
aState: TGridDrawState; const ACaption: string);
|
||||
begin
|
||||
Canvas.FillRect(aRect);
|
||||
DrawCellGrid(aCol, aRow, aRect, aState);
|
||||
if ACaption <> '' then
|
||||
WriteTextHeader(Canvas, aRect, ACaption, GetColumnAlignment(aCol, true))
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.OutCaptionCellText90(aCol,aRow: Integer;const aRect: TRect;
|
||||
aState: TGridDrawState;const ACaption:string; const TextOrient:TTextOrientation);
|
||||
var
|
||||
dW:integer;
|
||||
begin
|
||||
Canvas.FillRect(aRect);
|
||||
DrawCellGrid(aCol,aRow,aRect,aState);
|
||||
|
||||
if TextOrient in [toVertical90, toVertical270] then
|
||||
dW:=((aRect.Bottom - aRect.Top) - Canvas.TextWidth(ACaption)) div 2
|
||||
else
|
||||
dW:=0;
|
||||
OutTextXY90(Canvas, aRect.Left, aRect.Top+dw, ACaption, TextOrient);
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.OutCaptionSortMarker(const aRect: TRect;
|
||||
ASortMarker: TSortMarker);
|
||||
var
|
||||
X,Y:integer;
|
||||
begin
|
||||
if (dgHeaderPushedLook in Options) then
|
||||
begin
|
||||
if ASortMarker = smDown then
|
||||
begin
|
||||
X:=aRect.Right - FMarkerDown.Width - 6;
|
||||
Y:=Trunc((aRect.Top+aRect.Bottom-FMarkerDown.Height)/2);
|
||||
Canvas.Draw(X, Y, FMarkerDown);
|
||||
end
|
||||
else
|
||||
if ASortMarker = smUp then
|
||||
begin
|
||||
X:=aRect.Right - FMarkerUp.Width - 6;
|
||||
Y:=Trunc((aRect.Top+aRect.Bottom-FMarkerUp.Height)/2);
|
||||
Canvas.Draw(X, Y, FMarkerUp);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.OutCaptionMLCellText(aCol, aRow: Integer;
|
||||
aRect: TRect; aState: TGridDrawState; MLI: TMLCaptionItem);
|
||||
var
|
||||
MLINext: TMLCaptionItem;
|
||||
begin
|
||||
MLINext:=MLI.Next;
|
||||
while Assigned(MLINext) do
|
||||
begin
|
||||
aRect.Right:=aRect.Right + MLINext.Width;
|
||||
MLINext:=MLINext.Next;
|
||||
end;
|
||||
OutCaptionCellText(aCol, aRow, aRect, aState, MLI.Caption);
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.OnIniSave(Sender: TObject);
|
||||
var
|
||||
i:integer;
|
||||
@ -945,7 +1092,7 @@ end;
|
||||
|
||||
var
|
||||
i, ACount:integer;
|
||||
S, S1, ColumName{, S2}:string;
|
||||
S, S1, ColumName:string;
|
||||
C:TRxColumn;
|
||||
|
||||
begin
|
||||
@ -969,18 +1116,16 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
{$IFDEF Win32}
|
||||
procedure TRxDBGrid.CreateWnd;
|
||||
{procedure TRxDBGrid.CreateWnd;
|
||||
begin
|
||||
BeginUpdate;
|
||||
try
|
||||
inherited CreateWnd;
|
||||
CalcTitle;
|
||||
// CalcTitle;
|
||||
finally
|
||||
EndUpdate;
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;}
|
||||
|
||||
procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: Integer; aRect: TRect;
|
||||
aState: TGridDrawState);
|
||||
@ -998,7 +1143,7 @@ end;
|
||||
procedure TRxDBGrid.DefaultDrawTitle(aCol, aRow: Integer; aRect: TRect;
|
||||
aState: TGridDrawState);
|
||||
|
||||
procedure FixRectangle;
|
||||
{ procedure FixRectangle;
|
||||
begin
|
||||
case Canvas.TextStyle.Alignment of
|
||||
Classes.taLeftJustify: Inc(aRect.Left, 3);
|
||||
@ -1008,29 +1153,18 @@ procedure TRxDBGrid.DefaultDrawTitle(aCol, aRow: Integer; aRect: TRect;
|
||||
tlTop: Inc(aRect.Top, 3);
|
||||
tlBottom: Dec(aRect.Bottom, 3);
|
||||
end;
|
||||
end;
|
||||
end;}
|
||||
|
||||
var
|
||||
ASortMarker: TSortMarker;
|
||||
Background: TColor;
|
||||
X1,Y1, dW, i, dww:integer;
|
||||
i:integer;
|
||||
Down:boolean;
|
||||
aRect1,
|
||||
aRect2: TRect;
|
||||
FTit:TRxColumnTitle;
|
||||
FCap:string;
|
||||
TextOrient:TTextOrientation;
|
||||
FTitle :TRxColumnTitle;
|
||||
GrdCol:TGridColumn;
|
||||
MLI, MLINext:TMLCaptionItem;
|
||||
|
||||
function ATextWidth(S:string):integer;
|
||||
var
|
||||
wc:integer;
|
||||
begin
|
||||
Result:=(Canvas.TextWidth(S)+4) div GrdCol.Width + 1;
|
||||
wc:=WordCount(s, [' ']);
|
||||
if Result>wc then
|
||||
Result:=wc;
|
||||
end;
|
||||
|
||||
begin
|
||||
if (dgIndicator in Options) and (aCol=0) then
|
||||
@ -1040,11 +1174,12 @@ begin
|
||||
exit;
|
||||
end;
|
||||
|
||||
Down := FPressed and FTitleButtons and (FPressedCol = TColumn(ColumnFromGridColumn(aCol)));
|
||||
PrepareCanvas(aCol, aRow, aState);
|
||||
Down := FPressed and (dgHeaderPushedLook in Options) and (FPressedCol = TColumn(ColumnFromGridColumn(aCol)));
|
||||
|
||||
ASortMarker := smNone;
|
||||
|
||||
if (FSortField = GetFieldFromGridColumn(aCol)) then ASortMarker := FSortOrder;
|
||||
|
||||
if Assigned(FOnGetBtnParams) and Assigned(GetFieldFromGridColumn(aCol)) then
|
||||
begin
|
||||
Background:=Canvas.Brush.Color;
|
||||
@ -1053,102 +1188,89 @@ begin
|
||||
Canvas.Brush.Color:=Background;
|
||||
end;
|
||||
|
||||
Canvas.FillRect(aRect);
|
||||
DrawCellGrid(aCol,aRow,aRect,aState);
|
||||
|
||||
if (gdFixed in aState) and (aRow=0) and (ACol>=FixedCols) then
|
||||
begin
|
||||
aRect1:=aRect;
|
||||
FixRectangle;
|
||||
TextOrient:=toHorizontal;
|
||||
|
||||
GrdCol:=ColumnFromGridColumn(aCol);
|
||||
if Assigned(GrdCol) then
|
||||
FTit:=TRxColumnTitle(GrdCol.Title)
|
||||
FTitle:=TRxColumnTitle(GrdCol.Title)
|
||||
else
|
||||
FTit:=nil;
|
||||
FTitle:=nil;
|
||||
|
||||
if not Assigned(FTit) then
|
||||
FCap:=GetDefaultColumnTitle(aCol)
|
||||
if Assigned(FTitle) then
|
||||
begin
|
||||
if FTitle.Orientation <> toHorizontal then
|
||||
begin
|
||||
OutCaptionCellText90(aCol, aRow, aRect, aState, FTitle.Caption, FTitle.Orientation);
|
||||
if Down then
|
||||
aState:= aState + [gdPushed];
|
||||
end
|
||||
else
|
||||
if (FTitle.CaptionLinesCount>0) then
|
||||
begin
|
||||
aRect2.Left:=aRect.Left;
|
||||
aRect2.Right:=aRect.Right;
|
||||
aRect2.Top:=aRect.Top;
|
||||
for i:=0 to FTitle.CaptionLinesCount - 1 do
|
||||
begin
|
||||
MLI:=FTitle.CaptionLine(i);
|
||||
aRect2.Right:=aRect.Right;
|
||||
|
||||
if i = FTitle.CaptionLinesCount - 1 then
|
||||
begin
|
||||
aRect2.Bottom:=aRect.Bottom;
|
||||
aRect.Top:=ARect2.Top;
|
||||
if Down then
|
||||
aState:= aState + [gdPushed];
|
||||
end
|
||||
else
|
||||
begin
|
||||
FCap:=FTit.Caption;
|
||||
TextOrient:=FTit.Orientation;
|
||||
aRect2.Bottom:=aRect2.Top + DefaultRowHeight;
|
||||
end;
|
||||
|
||||
if TextOrient = toHorizontal then
|
||||
begin
|
||||
aRect2:=aRect;
|
||||
// aRect2.Left:=aRect2.Left - 2;
|
||||
Inc(aRect2.Left, 2);
|
||||
Dec(aRect2.Right, 2);
|
||||
if ASortMarker <> smNone then
|
||||
aRect2.Right := aRect2.Right - FMarkerDown.Width;
|
||||
|
||||
if Assigned(FTit) and (FTit.MCountLines>0) then
|
||||
if Assigned(MLI.Next) then
|
||||
begin
|
||||
dW:=Canvas.TextHeight('W') + 4;
|
||||
for i:=0 to FTit.MCountLines-1 do
|
||||
if Assigned(MLI.Prior) then
|
||||
begin
|
||||
FCap:=FTit.MGetLine(i);
|
||||
dww:=ATextWidth(FCap) * dW;
|
||||
aRect2.Bottom:=aRect2.Top + dww;
|
||||
|
||||
|
||||
WriteTextHeader(Canvas, aRect2, FCap, GetColumnAlignment(aCol, true));
|
||||
aRect2.Top:=aRect2.Top + dww;
|
||||
|
||||
if (rdgMultiTitleLines in OptionsRx) and (i < FTit.MCountLines-1) then
|
||||
if aCol = LeftCol then
|
||||
OutCaptionMLCellText(aCol, aRow, aRect2, aState, MLI);
|
||||
end
|
||||
else
|
||||
OutCaptionMLCellText(aCol, aRow, aRect2, aState, MLI);
|
||||
end
|
||||
else
|
||||
begin
|
||||
Canvas.Pen.Style := psSolid;
|
||||
Canvas.Pen.Color := cl3DShadow;
|
||||
Canvas.Line(aRect2.Right - 4, aRect2.Top, aRect2.Left, aRect2.Top);
|
||||
Canvas.Pen.Color := cl3DHilight;
|
||||
Canvas.Line(aRect2.Right - 4, aRect2.Top+1, aRect2.Left, aRect2.Top+1);
|
||||
if not Assigned(MLI.Prior) then
|
||||
begin
|
||||
OutCaptionCellText(aCol, aRow, aRect2, aState, MLI.Caption);
|
||||
end
|
||||
else
|
||||
if aCol = LeftCol then
|
||||
OutCaptionMLCellText(aCol, aRow, aRect2, aState, MLI);
|
||||
end;
|
||||
aRect2.Top:=aRect2.Top + 1;
|
||||
aRect2.Top:=aRect2.Bottom;
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
WriteTextHeader(Canvas, aRect2, FCap, GetColumnAlignment(aCol, true))
|
||||
if Down then
|
||||
aState:= aState + [gdPushed];
|
||||
OutCaptionCellText(aCol, aRow, aRect, aState, FTitle.Caption);
|
||||
end;
|
||||
end
|
||||
else
|
||||
begin
|
||||
if TextOrient in [toVertical90, toVertical270] then
|
||||
dW:=((aRect.Bottom - aRect.Top) - Canvas.TextWidth(FCap)) div 2
|
||||
else
|
||||
dw:=0;
|
||||
OutTextXY90(Canvas, aRect.Left, aRect.Top+dw, FCap, FTit.Orientation);
|
||||
OutCaptionCellText(aCol, aRow, aRect, aState, GetDefaultColumnTitle(aCol));
|
||||
end;
|
||||
|
||||
// aRect1:=aRect;
|
||||
if FTitleButtons then
|
||||
begin
|
||||
if ASortMarker = smDown then
|
||||
begin
|
||||
X1:=aRect.Right - FMarkerDown.Width - 6;
|
||||
Y1:=Trunc((aRect.Top+aRect.Bottom-FMarkerDown.Height)/2);
|
||||
Canvas.Draw(X1, Y1, FMarkerDown);
|
||||
OutCaptionSortMarker(aRect, ASortMarker);
|
||||
end
|
||||
else
|
||||
if ASortMarker = smUp then
|
||||
begin
|
||||
X1:=aRect.Right - FMarkerUp.Width - 6;
|
||||
Y1:=Trunc((aRect.Top+aRect.Bottom-FMarkerUp.Height)/2);
|
||||
Canvas.Draw(X1, Y1, FMarkerUp);
|
||||
if Down then
|
||||
aState:= aState + [gdPushed];
|
||||
OutCaptionCellText(aCol, aRow, aRect, aState, '');
|
||||
end;
|
||||
end;
|
||||
|
||||
if (FTitleButtons or ([dgRowLines, dgColLines] * Options =
|
||||
[dgRowLines, dgColLines])) and Down then
|
||||
begin
|
||||
DrawEdge(Canvas.Handle, ARect1, EdgeFlag[Down], BF_BOTTOMRIGHT);
|
||||
DrawEdge(Canvas.Handle, ARect1, EdgeFlag[Down], BF_TOPLEFT);
|
||||
end
|
||||
end
|
||||
else
|
||||
DefaultDrawCell(aCol, aRow, aRect, aState);
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.DefaultDrawFilter(aCol, aRow: Integer; aRect: TRect;
|
||||
@ -1274,7 +1396,7 @@ var
|
||||
AImageIndex:integer;
|
||||
FBackground: TColor;
|
||||
begin
|
||||
if {FTitleButtons and }(gdFixed in aState) and (aRow=0){ and (ACol>=FixedCols)} then
|
||||
if (gdFixed in aState) and (aRow=0) then
|
||||
DefaultDrawCellA(aCol, aRow, aRect, aState)
|
||||
else
|
||||
if not ((gdFixed in aState) or (aCol=0) or (aRow=0)) then
|
||||
@ -1355,12 +1477,9 @@ begin
|
||||
R.Bottom:=TotalYOffs + DefaultRowHeight * FooterRowCount + 2;
|
||||
|
||||
Canvas.Brush.Color := FFooterColor;
|
||||
// Writeln('[]Name ='+Owner.Name+'.'+Name);
|
||||
if (Columns.Count > 0) then
|
||||
begin
|
||||
TxS:=Canvas.TextStyle;
|
||||
// writeln('GCache.VisibleGrid.Left =',GCache.VisibleGrid.Left,' GCache.VisibleGrid.Right=', GCache.VisibleGrid.Right);
|
||||
// writeln('Columns.Count=',Columns.Count);
|
||||
for i := GCache.VisibleGrid.Left to GCache.VisibleGrid.Right do
|
||||
begin
|
||||
ColRowToOffset(True, True, i, R.Left, R.Right);
|
||||
@ -1368,8 +1487,6 @@ begin
|
||||
DrawCellGrid(i, 0, R, []);
|
||||
|
||||
C := ColumnFromGridColumn(i) as TRxColumn;
|
||||
// if C = nil then
|
||||
// Writeln('i=',i,';', ' C = nil = ',C=nil);
|
||||
if Assigned(C) then
|
||||
begin
|
||||
TxS.Alignment:=C.Footer.Alignment;
|
||||
@ -1393,7 +1510,7 @@ end;
|
||||
|
||||
procedure TRxDBGrid.DoTitleClick(ACol: Longint; AField: TField);
|
||||
begin
|
||||
if FAutoSort and (FSortEngine<>nil) then
|
||||
if FAutoSort and (FSortEngine<>nil) and (AField<>nil) then
|
||||
begin
|
||||
if AField=FSortField then
|
||||
begin
|
||||
@ -1545,7 +1662,7 @@ var
|
||||
begin
|
||||
FColumnResizing := false;
|
||||
|
||||
if FTitleButtons and FTracking and (FPressedCol <> nil) then
|
||||
if (dgHeaderPushedLook in Options) and FTracking and (FPressedCol <> nil) then
|
||||
begin
|
||||
Cell := MouseCoord(X, Y);
|
||||
DoClick := PtInRect(Rect(0, 0, ClientWidth, ClientHeight), Point(X, Y))
|
||||
@ -1663,6 +1780,14 @@ begin
|
||||
Dec(GCache.ClientHeight, DefaultRowHeight * FooterRowCount + 2);
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.ColRowMoved(IsColumn: Boolean; FromIndex, ToIndex: Integer
|
||||
);
|
||||
begin
|
||||
inherited ColRowMoved(IsColumn, FromIndex, ToIndex);
|
||||
if IsColumn then
|
||||
CalcTitle;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.Paint;
|
||||
begin
|
||||
inherited Paint;
|
||||
@ -1739,7 +1864,6 @@ var
|
||||
WA:PIntegerArray;
|
||||
begin
|
||||
GetMem(WA, SizeOf(Integer) * AColList.Count);
|
||||
// FillChar(WA^, SizeOf(Integer) * AColList.Count, 0);
|
||||
|
||||
for I := 0 to AColList.Count-1 do
|
||||
WA^[i]:=20;
|
||||
@ -1779,6 +1903,13 @@ begin
|
||||
Result:=DefaultRowHeight = Canvas.TextHeight('W');
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.VisualChange;
|
||||
begin
|
||||
inherited VisualChange;
|
||||
if Canvas.HandleAllocated then
|
||||
CalcTitle;
|
||||
end;
|
||||
|
||||
function TRxDBGrid.EditorByStyle(Style: TColumnButtonStyle): TWinControl;
|
||||
var
|
||||
F:TField;
|
||||
@ -1809,7 +1940,7 @@ var
|
||||
P:TBookmark;
|
||||
DS:TDataSet;
|
||||
i:integer;
|
||||
J:integer;
|
||||
// J:integer;
|
||||
begin
|
||||
if (not ((rdgFooterRows in OptionsRx) and DatalinkActive)) or (Columns.Count = 0) then
|
||||
Exit;
|
||||
@ -1893,16 +2024,12 @@ begin
|
||||
|
||||
FMarkerUp := LoadLazResBitmapImage('rx_markerup');
|
||||
FMarkerDown := LoadLazResBitmapImage('rx_markerdown');
|
||||
{ FMarkerUp := TBitmap.Create;
|
||||
FMarkerUp.LoadFromLazarusResource('rx_markerup');
|
||||
FMarkerDown := TBitmap.Create;
|
||||
FMarkerDown.LoadFromLazarusResource('rx_markerdown');}
|
||||
|
||||
FPropertyStorageLink:=TPropertyStorageLink.Create;
|
||||
FPropertyStorageLink.OnSave:=@OnIniSave;
|
||||
FPropertyStorageLink.OnLoad:=@OnIniLoad;
|
||||
|
||||
FTitleLines := TITLE_DEFAULT;
|
||||
// FTitleLines := TITLE_DEFAULT;
|
||||
FAllowedOperations:=[aoInsert, aoUpdate, aoDelete, aoAppend];
|
||||
|
||||
FFooterColor:=clWindow;
|
||||
@ -2070,38 +2197,64 @@ begin
|
||||
TRxColumn(Column).ColumnChanged;
|
||||
end;
|
||||
|
||||
function TRxColumnTitle.MCountLines: integer;
|
||||
function TRxColumnTitle.GetCaptionLinesCount: integer;
|
||||
begin
|
||||
Result:=FMultiLines.Count;
|
||||
if Assigned(FCaptionLines) then
|
||||
Result:=FCaptionLines.Count
|
||||
else
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function TRxColumnTitle.MGetLine(ALine: integer): string;
|
||||
function TRxColumnTitle.CaptionLine(ALine:integer):TMLCaptionItem;
|
||||
begin
|
||||
if (FMultiLines.Count>0) and (ALine>=0) and (FMultiLines.Count>ALine) then
|
||||
Result:=FMultiLines[ALine]
|
||||
if Assigned(FCaptionLines) and (FCaptionLines.Count>0) and (ALine>=0) and (FCaptionLines.Count>ALine) then
|
||||
Result:=TMLCaptionItem(FCaptionLines[ALine])
|
||||
else
|
||||
Result:='';
|
||||
Result:=nil;
|
||||
end;
|
||||
|
||||
procedure TRxColumnTitle.ClearCaptionML;
|
||||
var
|
||||
i:integer;
|
||||
R:TMLCaptionItem;
|
||||
begin
|
||||
for i:=0 to FCaptionLines.Count - 1 do
|
||||
begin
|
||||
R:=TMLCaptionItem(FCaptionLines[i]);
|
||||
R.Free;
|
||||
end;
|
||||
FCaptionLines.Clear;
|
||||
end;
|
||||
|
||||
procedure TRxColumnTitle.SetCaption(const AValue: TCaption);
|
||||
var
|
||||
c:integer;
|
||||
s:string;
|
||||
|
||||
procedure AddMLStr(AStr:string);
|
||||
var
|
||||
R:TMLCaptionItem;
|
||||
begin
|
||||
R:=TMLCaptionItem.Create;
|
||||
R.Caption:=AStr;
|
||||
FCaptionLines.Add(R);
|
||||
end;
|
||||
|
||||
begin
|
||||
inherited SetCaption(AValue);
|
||||
FMultiLines.Clear;
|
||||
ClearCaptionML;
|
||||
c:=Pos('|', AValue);
|
||||
if C>0 then
|
||||
begin
|
||||
S:=AValue;
|
||||
while C>0 do
|
||||
begin
|
||||
FMultiLines.Add(Copy(S, 1, C-1));
|
||||
AddMLStr(Copy(S, 1, C-1));
|
||||
System.Delete(S, 1, C);
|
||||
c:=Pos('|', S);
|
||||
end;
|
||||
if S<>'' then
|
||||
FMultiLines.Add(S);
|
||||
AddMLStr(S);
|
||||
end;
|
||||
if not (csLoading in Column.Grid.ComponentState) and Column.Grid.HandleAllocated then
|
||||
TRxDBGrid(Column.Grid).CalcTitle;
|
||||
@ -2110,15 +2263,16 @@ end;
|
||||
constructor TRxColumnTitle.Create(TheColumn: TGridColumn);
|
||||
begin
|
||||
inherited Create(TheColumn);
|
||||
FMultiLines:=TStringList.Create;
|
||||
{$IFDEF NEW_STYLE_TITLE_ALIGNMENT_RXDBGRID}
|
||||
Alignment:=taCenter;
|
||||
{$ENDIF}
|
||||
FCaptionLines:=TFPList.Create;
|
||||
end;
|
||||
|
||||
destructor TRxColumnTitle.Destroy;
|
||||
begin
|
||||
FreeAndNil(FMultiLines);
|
||||
ClearCaptionML;
|
||||
FreeAndNil(FCaptionLines);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
@ -25,7 +25,7 @@ translate to Lazarus by alexs in 2005 - 2009
|
||||
"/>
|
||||
<License Value="free ware
|
||||
"/>
|
||||
<Version Major="2" Release="1" Build="103"/>
|
||||
<Version Major="2" Minor="1" Release="1" Build="103"/>
|
||||
<Files Count="51">
|
||||
<Item1>
|
||||
<Filename Value="rxlookup.pas"/>
|
||||
|
Reference in New Issue
Block a user