You've already forked lazarus-ccr
RxFPC: RxDBVerticalGrid fix row higth on show/hide column title
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6009 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -9,7 +9,7 @@
|
||||
<IsPartOfProject Value="True"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<CursorPos Y="16"/>
|
||||
<UsageCount Value="36"/>
|
||||
<UsageCount Value="37"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="unit1.pas"/>
|
||||
@ -18,10 +18,9 @@
|
||||
<HasResources Value="True"/>
|
||||
<ResourceBaseClass Value="Form"/>
|
||||
<UnitName Value="Unit1"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<TopLine Value="73"/>
|
||||
<CursorPos X="70" Y="78"/>
|
||||
<UsageCount Value="36"/>
|
||||
<TopLine Value="75"/>
|
||||
<CursorPos X="5" Y="92"/>
|
||||
<UsageCount Value="37"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@ -34,7 +33,7 @@
|
||||
</Unit2>
|
||||
<Unit3>
|
||||
<Filename Value="../../rxdb/rxdbgrid.pas"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<TopLine Value="4122"/>
|
||||
<CursorPos Y="4148"/>
|
||||
<UsageCount Value="18"/>
|
||||
@ -43,7 +42,7 @@
|
||||
<Unit4>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<EditorIndex Value="4"/>
|
||||
<TopLine Value="985"/>
|
||||
<CursorPos X="15" Y="1001"/>
|
||||
<UsageCount Value="15"/>
|
||||
@ -176,12 +175,12 @@
|
||||
</Unit21>
|
||||
<Unit22>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<TopLine Value="1257"/>
|
||||
<CursorPos X="31" Y="1281"/>
|
||||
<EditorIndex Value="5"/>
|
||||
<TopLine Value="1174"/>
|
||||
<CursorPos X="9" Y="1194"/>
|
||||
<UsageCount Value="18"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="38" Y="913" ID="1"/>
|
||||
<Item0 X="38" Y="914" ID="1"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit22>
|
||||
@ -306,7 +305,8 @@
|
||||
</Unit39>
|
||||
<Unit40>
|
||||
<Filename Value="../../rxcontrols/rxlclutils.pas"/>
|
||||
<EditorIndex Value="8"/>
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="6"/>
|
||||
<TopLine Value="743"/>
|
||||
<CursorPos X="111" Y="772"/>
|
||||
<UsageCount Value="10"/>
|
||||
@ -492,11 +492,10 @@
|
||||
</Unit65>
|
||||
<Unit66>
|
||||
<Filename Value="../../../../lcl/include/dbimage.inc"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="27"/>
|
||||
<CursorPos X="3" Y="29"/>
|
||||
<UsageCount Value="11"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit66>
|
||||
<Unit67>
|
||||
<Filename Value="../../../../lcl/include/picture.inc"/>
|
||||
@ -508,7 +507,7 @@
|
||||
<Unit68>
|
||||
<Filename Value="../../../../lcl/extctrls.pp"/>
|
||||
<UnitName Value="ExtCtrls"/>
|
||||
<EditorIndex Value="3"/>
|
||||
<EditorIndex Value="2"/>
|
||||
<TopLine Value="494"/>
|
||||
<CursorPos X="6" Y="504"/>
|
||||
<UsageCount Value="11"/>
|
||||
@ -538,133 +537,132 @@
|
||||
<Unit72>
|
||||
<Filename Value="/home/install/source/fpcsrc/rtl/objpas/types.pp"/>
|
||||
<UnitName Value="Types"/>
|
||||
<EditorIndex Value="7"/>
|
||||
<EditorIndex Value="-1"/>
|
||||
<TopLine Value="313"/>
|
||||
<CursorPos X="10" Y="331"/>
|
||||
<UsageCount Value="10"/>
|
||||
<Loaded Value="True"/>
|
||||
</Unit72>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<Position1>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="194" Column="15" TopLine="176"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="102" Column="54" TopLine="91"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="958" Column="3" TopLine="954"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="104" Column="54" TopLine="93"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="207" Column="15" TopLine="176"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="106" TopLine="92"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1049" Column="3" TopLine="1046"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="57" Column="15" TopLine="38"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="252" Column="15" TopLine="224"/>
|
||||
<Caret Line="1457" Column="21" TopLine="1439"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="414" Column="3" TopLine="412"/>
|
||||
<Caret Line="302" TopLine="282"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="294" Column="15" TopLine="275"/>
|
||||
<Caret Line="1372" Column="3" TopLine="1364"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1182" Column="11" TopLine="1171"/>
|
||||
<Caret Line="301" Column="15" TopLine="284"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="303" Column="28" TopLine="275"/>
|
||||
<Caret Line="1308" Column="3" TopLine="1293"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1462" Column="3" TopLine="1430"/>
|
||||
<Caret Line="300" Column="15" TopLine="283"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="102" Column="54" TopLine="91"/>
|
||||
<Caret Line="100" Column="5" TopLine="73"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1483" Column="19" TopLine="1446"/>
|
||||
<Caret Line="345" Column="14" TopLine="327"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="299" Column="15" TopLine="287"/>
|
||||
<Caret Line="316" Column="14" TopLine="298"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1209" Column="3" TopLine="1203"/>
|
||||
<Caret Line="291" Column="15" TopLine="271"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="300" Column="15" TopLine="281"/>
|
||||
<Caret Line="1585" Column="3" TopLine="1581"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1265" Column="3" TopLine="1257"/>
|
||||
<Caret Line="293" Column="15" TopLine="272"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../rxcontrols/rxlclutils.pas"/>
|
||||
<Caret Line="100" Column="11" TopLine="81"/>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1168" Column="3" TopLine="1166"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1265" Column="3" TopLine="1257"/>
|
||||
<Caret Line="222" Column="15" TopLine="207"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="303" Column="15" TopLine="282"/>
|
||||
<Caret Line="189" Column="15" TopLine="172"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1457" Column="19" TopLine="1444"/>
|
||||
<Caret Line="903" Column="3" TopLine="897"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="102" Column="54" TopLine="91"/>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="294" Column="15" TopLine="275"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="104" Column="54" TopLine="93"/>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1173" Column="3" TopLine="1171"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="106" TopLine="92"/>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="295" Column="31" TopLine="275"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="57" Column="15" TopLine="38"/>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1188" Column="18" TopLine="1185"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1457" Column="21" TopLine="1439"/>
|
||||
<Caret Line="1185" Column="35" TopLine="1169"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="302" TopLine="282"/>
|
||||
<Caret Line="314" Column="15" TopLine="295"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1372" Column="3" TopLine="1364"/>
|
||||
<Caret Line="291" Column="15" TopLine="272"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="301" Column="15" TopLine="284"/>
|
||||
<Caret Line="1613" Column="19" TopLine="1594"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="1308" Column="3" TopLine="1293"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="100" Column="5" TopLine="73"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../rxdb/rxdbverticalgrid.pas"/>
|
||||
<Caret Line="300" Column="15" TopLine="283"/>
|
||||
<Filename Value="unit1.pas"/>
|
||||
<Caret Line="101" Column="5" TopLine="74"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectSession>
|
||||
|
@ -7,12 +7,14 @@ object Form1: TForm1
|
||||
ClientHeight = 749
|
||||
ClientWidth = 1206
|
||||
OnCreate = FormCreate
|
||||
Position = poScreenCenter
|
||||
LCLVersion = '1.9.0.0'
|
||||
object RxDBVerticalGrid1: TRxDBVerticalGrid
|
||||
Left = 440
|
||||
Height = 416
|
||||
Top = 328
|
||||
Width = 728
|
||||
Left = 899
|
||||
Height = 642
|
||||
Top = 107
|
||||
Width = 307
|
||||
Align = alClient
|
||||
Color = clWindow
|
||||
GridDefValues.BlobText = '(данные)'
|
||||
DataCoumn.Title.Alignment = taCenter
|
||||
@ -168,10 +170,10 @@ object Form1: TForm1
|
||||
)
|
||||
end
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 40
|
||||
Height = 312
|
||||
Top = 8
|
||||
Width = 1080
|
||||
Left = 0
|
||||
Height = 642
|
||||
Top = 107
|
||||
Width = 894
|
||||
ColumnDefValues.BlobText = '(данные)'
|
||||
TitleButtons = False
|
||||
AutoSort = True
|
||||
@ -353,6 +355,7 @@ object Form1: TForm1
|
||||
SearchOptions.QuickSearchOptions = [loCaseInsensitive, loPartialKey]
|
||||
SearchOptions.FromStart = False
|
||||
OptionsRx = [rdgAllowColumnsForm, rdgAllowDialogFind, rdgAllowQuickFilter]
|
||||
Align = alLeft
|
||||
Color = clWindow
|
||||
DrawFullLine = False
|
||||
FocusColor = clRed
|
||||
@ -363,42 +366,54 @@ object Form1: TForm1
|
||||
TabOrder = 1
|
||||
TitleStyle = tsNative
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 107
|
||||
Top = 0
|
||||
Width = 1206
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
ClientHeight = 107
|
||||
ClientWidth = 1206
|
||||
TabOrder = 2
|
||||
object Button1: TButton
|
||||
Left = 208
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 7
|
||||
Height = 36
|
||||
Top = 430
|
||||
Top = 7
|
||||
Width = 80
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Diconnect'
|
||||
OnClick = Button1Click
|
||||
TabOrder = 2
|
||||
TabOrder = 0
|
||||
end
|
||||
object Button2: TButton
|
||||
Left = 208
|
||||
AnchorSideLeft.Control = Button1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 93
|
||||
Height = 36
|
||||
Top = 472
|
||||
Top = 7
|
||||
Width = 69
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Connect'
|
||||
OnClick = Button2Click
|
||||
TabOrder = 3
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
Left = 28
|
||||
Height = 24
|
||||
Top = 341
|
||||
Width = 110
|
||||
Caption = 'Show header'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 4
|
||||
TabOrder = 1
|
||||
end
|
||||
object RadioGroup1: TRadioGroup
|
||||
Left = 24
|
||||
AnchorSideLeft.Control = Button2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 168
|
||||
Height = 93
|
||||
Top = 400
|
||||
Top = 7
|
||||
Width = 83
|
||||
AutoFill = True
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Image align'
|
||||
ChildSizing.LeftRightSpacing = 6
|
||||
ChildSizing.EnlargeHorizontal = crsHomogenousChildResize
|
||||
@ -416,16 +431,41 @@ object Form1: TForm1
|
||||
'Center'
|
||||
)
|
||||
OnClick = CheckBox1Change
|
||||
TabOrder = 5
|
||||
TabOrder = 2
|
||||
end
|
||||
object CheckBox2: TCheckBox
|
||||
Left = 28
|
||||
AnchorSideLeft.Control = RadioGroup1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBox1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 257
|
||||
Height = 24
|
||||
Top = 368
|
||||
Top = 37
|
||||
Width = 111
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Show images'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 6
|
||||
TabOrder = 3
|
||||
end
|
||||
object CheckBox1: TCheckBox
|
||||
AnchorSideLeft.Control = RadioGroup1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 257
|
||||
Height = 24
|
||||
Top = 7
|
||||
Width = 110
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Show header'
|
||||
OnChange = CheckBox1Change
|
||||
TabOrder = 4
|
||||
end
|
||||
end
|
||||
object Splitter1: TSplitter
|
||||
Left = 894
|
||||
Height = 642
|
||||
Top = 107
|
||||
Width = 5
|
||||
end
|
||||
object dsData: TDataSource
|
||||
DataSet = rxData
|
||||
|
@ -32,6 +32,7 @@ type
|
||||
MenuItem7: TMenuItem;
|
||||
MenuItem8: TMenuItem;
|
||||
MenuItem9: TMenuItem;
|
||||
Panel1: TPanel;
|
||||
PopupMenu1: TPopupMenu;
|
||||
PopupMenu2: TPopupMenu;
|
||||
PopupMenu3: TPopupMenu;
|
||||
@ -51,6 +52,7 @@ type
|
||||
RxDBGrid1: TRxDBGrid;
|
||||
RxDBVerticalGrid1: TRxDBVerticalGrid;
|
||||
rxData: TRxMemoryData;
|
||||
Splitter1: TSplitter;
|
||||
procedure Button1Click(Sender: TObject);
|
||||
procedure Button2Click(Sender: TObject);
|
||||
procedure CheckBox1Change(Sender: TObject);
|
||||
|
@ -292,6 +292,7 @@ type
|
||||
procedure SetRows(AValue: TRxDBVerticalGridRows);
|
||||
procedure RecordChanged;
|
||||
procedure RowsChanged(aRow: TRxDBVerticalGridRow);
|
||||
procedure UpdateRowsHight;
|
||||
protected
|
||||
procedure OutCaptionCellText(aCol, aRow: integer; const aRect: TRect;
|
||||
aState: TGridDrawState; const ACaption: string);
|
||||
@ -1181,6 +1182,19 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxCustomDBVerticalGrid.UpdateRowsHight;
|
||||
var
|
||||
R: TRxDBVerticalGridRow;
|
||||
i: Integer;
|
||||
begin
|
||||
for R in Rows do
|
||||
RowHeights[R.Index + FixedRows]:=R.RowHeight;
|
||||
|
||||
if FixedRows > 0 then
|
||||
for i:=0 to FixedRows-1 do
|
||||
RowHeights[i]:=DefaultRowHeight;
|
||||
end;
|
||||
|
||||
procedure TRxCustomDBVerticalGrid.OutCaptionCellText(aCol, aRow: integer;
|
||||
const aRect: TRect; aState: TGridDrawState; const ACaption: string);
|
||||
begin
|
||||
@ -1596,6 +1610,8 @@ begin
|
||||
RowCount:=RowCount - 1;
|
||||
FixedRows:=0;
|
||||
end;
|
||||
|
||||
UpdateRowsHight;
|
||||
end;
|
||||
|
||||
function TRxCustomDBVerticalGrid.GetDataSource: TDataSource;
|
||||
|
Reference in New Issue
Block a user