You've already forked lazarus-ccr
RxDBGrid - fix edit buttons
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2738 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -54,7 +54,7 @@
|
||||
<MinVersion Major="1" Release="18" Build="56" Valid="True"/>
|
||||
</Item4>
|
||||
</RequiredPackages>
|
||||
<Units Count="88">
|
||||
<Units Count="89">
|
||||
<Unit0>
|
||||
<Filename Value="RxDBGridDemo.lpr"/>
|
||||
<IsPartOfProject Value="True"/>
|
||||
@ -62,7 +62,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="9" Y="16"/>
|
||||
<UsageCount Value="89"/>
|
||||
<UsageCount Value="93"/>
|
||||
</Unit0>
|
||||
<Unit1>
|
||||
<Filename Value="rxdbgridmainunit.pas"/>
|
||||
@ -75,7 +75,7 @@
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1"/>
|
||||
<CursorPos X="12" Y="9"/>
|
||||
<UsageCount Value="89"/>
|
||||
<UsageCount Value="93"/>
|
||||
<Loaded Value="True"/>
|
||||
<LoadedDesigner Value="True"/>
|
||||
</Unit1>
|
||||
@ -105,12 +105,12 @@
|
||||
<IsVisibleTab Value="True"/>
|
||||
<EditorIndex Value="1"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="3900"/>
|
||||
<CursorPos X="1" Y="3921"/>
|
||||
<UsageCount Value="13"/>
|
||||
<TopLine Value="875"/>
|
||||
<CursorPos X="1" Y="904"/>
|
||||
<UsageCount Value="15"/>
|
||||
<Bookmarks Count="2">
|
||||
<Item0 X="3" Y="1230" ID="2"/>
|
||||
<Item1 X="1" Y="3831" ID="1"/>
|
||||
<Item0 X="1" Y="4269" ID="1"/>
|
||||
<Item1 X="1" Y="2499" ID="2"/>
|
||||
</Bookmarks>
|
||||
<Loaded Value="True"/>
|
||||
</Unit5>
|
||||
@ -501,17 +501,20 @@
|
||||
<Filename Value="../../../../lcl/dbgrids.pas"/>
|
||||
<UnitName Value="DBGrids"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="443"/>
|
||||
<CursorPos X="14" Y="463"/>
|
||||
<TopLine Value="3118"/>
|
||||
<CursorPos X="27" Y="3151"/>
|
||||
<UsageCount Value="18"/>
|
||||
</Unit58>
|
||||
<Unit59>
|
||||
<Filename Value="../../../../lcl/grids.pas"/>
|
||||
<UnitName Value="Grids"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="2558"/>
|
||||
<CursorPos X="1" Y="2580"/>
|
||||
<TopLine Value="7528"/>
|
||||
<CursorPos X="35" Y="7562"/>
|
||||
<UsageCount Value="21"/>
|
||||
<Bookmarks Count="1">
|
||||
<Item0 X="23" Y="7562" ID="3"/>
|
||||
</Bookmarks>
|
||||
</Unit59>
|
||||
<Unit60>
|
||||
<Filename Value="../../../../../../install/fpcsrc/rtl/objpas/classes/classesh.inc"/>
|
||||
@ -659,8 +662,8 @@
|
||||
<Filename Value="../../../../lcl/controls.pp"/>
|
||||
<UnitName Value="Controls"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="1843"/>
|
||||
<CursorPos X="15" Y="1865"/>
|
||||
<TopLine Value="2126"/>
|
||||
<CursorPos X="15" Y="2146"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit78>
|
||||
<Unit79>
|
||||
@ -689,8 +692,8 @@
|
||||
<Unit82>
|
||||
<Filename Value="../../../../lcl/include/wincontrol.inc"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="7674"/>
|
||||
<CursorPos X="1" Y="7696"/>
|
||||
<TopLine Value="7862"/>
|
||||
<CursorPos X="3" Y="7901"/>
|
||||
<UsageCount Value="11"/>
|
||||
</Unit82>
|
||||
<Unit83>
|
||||
@ -704,8 +707,8 @@
|
||||
<Unit84>
|
||||
<Filename Value="../../../../lcl/include/control.inc"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="5414"/>
|
||||
<CursorPos X="1" Y="5435"/>
|
||||
<TopLine Value="3955"/>
|
||||
<CursorPos X="1" Y="3977"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit84>
|
||||
<Unit85>
|
||||
@ -730,128 +733,99 @@
|
||||
<CursorPos X="1" Y="670"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit87>
|
||||
<Unit88>
|
||||
<Filename Value="../../../../lcl/include/winapi.inc"/>
|
||||
<WindowIndex Value="0"/>
|
||||
<TopLine Value="596"/>
|
||||
<CursorPos X="1" Y="618"/>
|
||||
<UsageCount Value="10"/>
|
||||
</Unit88>
|
||||
</Units>
|
||||
<JumpHistory Count="30" HistoryIndex="29">
|
||||
<JumpHistory Count="21" HistoryIndex="20">
|
||||
<Position1>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="2861" Column="22" TopLine="2826"/>
|
||||
<Caret Line="2498" Column="1" TopLine="2494"/>
|
||||
</Position1>
|
||||
<Position2>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="2862" Column="34" TopLine="2827"/>
|
||||
<Caret Line="4234" Column="1" TopLine="4213"/>
|
||||
</Position2>
|
||||
<Position3>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="2886" Column="16" TopLine="2851"/>
|
||||
<Caret Line="2536" Column="1" TopLine="2495"/>
|
||||
</Position3>
|
||||
<Position4>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="2891" Column="34" TopLine="2858"/>
|
||||
<Caret Line="4266" Column="1" TopLine="4250"/>
|
||||
</Position4>
|
||||
<Position5>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="2892" Column="59" TopLine="2858"/>
|
||||
<Caret Line="2496" Column="21" TopLine="2477"/>
|
||||
</Position5>
|
||||
<Position6>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="2903" Column="18" TopLine="2869"/>
|
||||
<Caret Line="1812" Column="20" TopLine="1806"/>
|
||||
</Position6>
|
||||
<Position7>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3327" Column="13" TopLine="3293"/>
|
||||
<Caret Line="4272" Column="1" TopLine="4251"/>
|
||||
</Position7>
|
||||
<Position8>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3378" Column="34" TopLine="3344"/>
|
||||
<Caret Line="2530" Column="32" TopLine="2501"/>
|
||||
</Position8>
|
||||
<Position9>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3380" Column="36" TopLine="3346"/>
|
||||
<Caret Line="4271" Column="1" TopLine="4250"/>
|
||||
</Position9>
|
||||
<Position10>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3791" Column="30" TopLine="3756"/>
|
||||
<Caret Line="140" Column="1" TopLine="140"/>
|
||||
</Position10>
|
||||
<Position11>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3888" Column="29" TopLine="3847"/>
|
||||
<Caret Line="618" Column="22" TopLine="586"/>
|
||||
</Position11>
|
||||
<Position12>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3935" Column="29" TopLine="3899"/>
|
||||
<Caret Line="3616" Column="28" TopLine="3581"/>
|
||||
</Position12>
|
||||
<Position13>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
<Caret Line="3783" Column="3" TopLine="3778"/>
|
||||
</Position13>
|
||||
<Position14>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="472" Column="20" TopLine="438"/>
|
||||
<Caret Line="515" Column="24" TopLine="496"/>
|
||||
</Position14>
|
||||
<Position15>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3893" Column="3" TopLine="3886"/>
|
||||
<Caret Line="3797" Column="38" TopLine="3763"/>
|
||||
</Position15>
|
||||
<Position16>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3830" Column="31" TopLine="3807"/>
|
||||
<Caret Line="4436" Column="22" TopLine="4403"/>
|
||||
</Position16>
|
||||
<Position17>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
<Caret Line="882" Column="6" TopLine="861"/>
|
||||
</Position17>
|
||||
<Position18>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3091" Column="79" TopLine="3055"/>
|
||||
<Caret Line="1285" Column="1" TopLine="1250"/>
|
||||
</Position18>
|
||||
<Position19>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3830" Column="48" TopLine="3796"/>
|
||||
<Caret Line="898" Column="5" TopLine="861"/>
|
||||
</Position19>
|
||||
<Position20>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3918" Column="24" TopLine="3881"/>
|
||||
<Caret Line="1286" Column="3" TopLine="1284"/>
|
||||
</Position20>
|
||||
<Position21>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3931" Column="80" TopLine="3897"/>
|
||||
<Caret Line="1283" Column="22" TopLine="1283"/>
|
||||
</Position21>
|
||||
<Position22>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position22>
|
||||
<Position23>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3089" Column="79" TopLine="3055"/>
|
||||
</Position23>
|
||||
<Position24>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3830" Column="48" TopLine="3796"/>
|
||||
</Position24>
|
||||
<Position25>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3915" Column="24" TopLine="3881"/>
|
||||
</Position25>
|
||||
<Position26>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3933" Column="1" TopLine="3904"/>
|
||||
</Position26>
|
||||
<Position27>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="1" Column="1" TopLine="1"/>
|
||||
</Position27>
|
||||
<Position28>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3089" Column="79" TopLine="3055"/>
|
||||
</Position28>
|
||||
<Position29>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3831" Column="18" TopLine="3796"/>
|
||||
</Position29>
|
||||
<Position30>
|
||||
<Filename Value="../../rxdbgrid.pas"/>
|
||||
<Caret Line="3829" Column="31" TopLine="3808"/>
|
||||
</Position30>
|
||||
</JumpHistory>
|
||||
</ProjectOptions>
|
||||
<CompilerOptions>
|
||||
|
@ -1,11 +1,11 @@
|
||||
object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Left = 144
|
||||
Left = 306
|
||||
Height = 721
|
||||
Top = 149
|
||||
Top = 142
|
||||
Width = 1187
|
||||
ActiveControl = Panel1
|
||||
Caption = 'RxDBGrid Demo'
|
||||
ClientHeight = 702
|
||||
ClientHeight = 698
|
||||
ClientWidth = 1187
|
||||
Menu = MainMenu1
|
||||
OnCreate = FormCreate
|
||||
@ -13,8 +13,8 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
LCLVersion = '1.1'
|
||||
object RxDBGrid1: TRxDBGrid
|
||||
Left = 0
|
||||
Height = 648
|
||||
Top = 54
|
||||
Height = 634
|
||||
Top = 64
|
||||
Width = 1187
|
||||
TitleButtons = True
|
||||
AutoSort = True
|
||||
@ -268,22 +268,22 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
end
|
||||
object Panel1: TPanel
|
||||
Left = 0
|
||||
Height = 54
|
||||
Height = 64
|
||||
Top = 0
|
||||
Width = 1187
|
||||
Align = alTop
|
||||
AutoSize = True
|
||||
ClientHeight = 54
|
||||
ClientHeight = 64
|
||||
ClientWidth = 1187
|
||||
TabOrder = 1
|
||||
object Label1: TLabel
|
||||
AnchorSideLeft.Control = Button2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 240
|
||||
Height = 13
|
||||
Left = 245
|
||||
Height = 15
|
||||
Top = 7
|
||||
Width = 26
|
||||
Width = 34
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Mode'
|
||||
ParentColor = False
|
||||
@ -292,9 +292,9 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideLeft.Control = Panel1
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 7
|
||||
Height = 23
|
||||
Height = 27
|
||||
Top = 7
|
||||
Width = 83
|
||||
Width = 77
|
||||
Action = actCalcTotal
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -304,10 +304,10 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideLeft.Control = Button1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 96
|
||||
Height = 23
|
||||
Left = 90
|
||||
Height = 27
|
||||
Top = 7
|
||||
Width = 138
|
||||
Width = 149
|
||||
Action = actOptimizeColumnsWidthAll
|
||||
AutoSize = True
|
||||
BorderSpacing.Around = 6
|
||||
@ -318,11 +318,11 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBox2
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 469
|
||||
Height = 17
|
||||
Left = 474
|
||||
Height = 22
|
||||
Hint = 'Use filter line'
|
||||
Top = 30
|
||||
Width = 63
|
||||
Top = 35
|
||||
Width = 78
|
||||
BorderSpacing.Left = 6
|
||||
Caption = 'Use filter'
|
||||
OnChange = CheckBox1Change
|
||||
@ -332,12 +332,12 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideLeft.Control = Label1
|
||||
AnchorSideTop.Control = Label1
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 246
|
||||
Height = 21
|
||||
Top = 26
|
||||
Left = 251
|
||||
Height = 25
|
||||
Top = 28
|
||||
Width = 217
|
||||
BorderSpacing.Around = 6
|
||||
ItemHeight = 13
|
||||
ItemHeight = 0
|
||||
ItemIndex = 0
|
||||
Items.Strings = (
|
||||
'Edit mode'
|
||||
@ -352,11 +352,11 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideLeft.Control = ComboBox1
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 469
|
||||
Height = 17
|
||||
Left = 474
|
||||
Height = 22
|
||||
Hint = 'Auto fill column width'
|
||||
Top = 7
|
||||
Width = 97
|
||||
Width = 122
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Auto fill columns'
|
||||
OnChange = CheckBox2Change
|
||||
@ -366,10 +366,10 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideLeft.Control = CheckBox2
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 572
|
||||
Height = 17
|
||||
Left = 602
|
||||
Height = 22
|
||||
Top = 7
|
||||
Width = 90
|
||||
Width = 113
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Show indicator'
|
||||
Checked = True
|
||||
@ -382,10 +382,10 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = CheckBox3
|
||||
AnchorSideTop.Side = asrBottom
|
||||
Left = 572
|
||||
Height = 17
|
||||
Top = 30
|
||||
Width = 88
|
||||
Left = 602
|
||||
Height = 22
|
||||
Top = 35
|
||||
Width = 111
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Show headers'
|
||||
Checked = True
|
||||
@ -397,10 +397,10 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
AnchorSideLeft.Control = CheckBox3
|
||||
AnchorSideLeft.Side = asrBottom
|
||||
AnchorSideTop.Control = Panel1
|
||||
Left = 668
|
||||
Height = 17
|
||||
Left = 721
|
||||
Height = 22
|
||||
Top = 7
|
||||
Width = 73
|
||||
Width = 90
|
||||
BorderSpacing.Around = 6
|
||||
Caption = 'Word wrap'
|
||||
OnChange = CheckBox5Change
|
||||
@ -553,29 +553,24 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
top = 197
|
||||
object MenuItem1: TMenuItem
|
||||
Action = actOptimizeWidthCol1
|
||||
OnClick = actOptimizeWidthCol1Execute
|
||||
end
|
||||
object MenuItem2: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object MenuItem4: TMenuItem
|
||||
Action = actCalcTotal
|
||||
OnClick = actCalcTotalExecute
|
||||
end
|
||||
object MenuItem3: TMenuItem
|
||||
Action = actOptimizeColumnsWidthAll
|
||||
OnClick = actOptimizeColumnsWidthAllExecute
|
||||
end
|
||||
object MenuItem5: TMenuItem
|
||||
Caption = '-'
|
||||
end
|
||||
object MenuItem7: TMenuItem
|
||||
Action = showColumnsDialog
|
||||
OnClick = showColumnsDialogExecute
|
||||
end
|
||||
object MenuItem6: TMenuItem
|
||||
Action = showFindDialog
|
||||
OnClick = showFindDialogExecute
|
||||
end
|
||||
end
|
||||
object ActionList1: TActionList
|
||||
@ -772,14 +767,12 @@ object RxDBGridMainForm: TRxDBGridMainForm
|
||||
Caption = 'System'
|
||||
object MenuItem11: TMenuItem
|
||||
Action = sysExit
|
||||
OnClick = sysExitExecute
|
||||
end
|
||||
end
|
||||
object MenuItem9: TMenuItem
|
||||
Caption = 'Help'
|
||||
object MenuItem10: TMenuItem
|
||||
Action = hlpAbout
|
||||
OnClick = hlpAboutExecute
|
||||
end
|
||||
end
|
||||
end
|
||||
|
@ -575,12 +575,14 @@ type
|
||||
|
||||
procedure DoClearInvalidTitle;
|
||||
procedure DoDrawInvalidTitle;
|
||||
procedure DoSetColEdtBtn;
|
||||
protected
|
||||
procedure CollumnSortListUpdate;
|
||||
procedure CollumnSortListClear;
|
||||
procedure CollumnSortListApply;
|
||||
|
||||
function DatalinkActive: boolean;
|
||||
procedure AdjustEditorBounds(NewCol,NewRow:Integer); override;
|
||||
procedure LinkActive(Value: Boolean); override;
|
||||
|
||||
procedure DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
||||
@ -1278,15 +1280,13 @@ begin
|
||||
UpdateMask;
|
||||
end;
|
||||
|
||||
{
|
||||
{
|
||||
procedure TRxDBGridDateEditor.SetBounds(aLeft, aTop, aWidth, aHeight: integer);
|
||||
begin
|
||||
BeginUpdateBounds;
|
||||
Dec(aWidth, 25); //ButtonWidth);
|
||||
inherited SetBounds(aLeft, aTop, aWidth, aHeight);
|
||||
EndUpdateBounds;
|
||||
end;
|
||||
}
|
||||
end; }
|
||||
|
||||
|
||||
procedure TRxDBGridDateEditor.EditingDone;
|
||||
begin
|
||||
@ -1802,6 +1802,15 @@ begin
|
||||
DataSource.DataSet.Active;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.AdjustEditorBounds(NewCol, NewRow: Integer);
|
||||
begin
|
||||
inherited AdjustEditorBounds(NewCol, NewRow);
|
||||
if EditorMode then
|
||||
begin
|
||||
DoSetColEdtBtn;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.TrackButton(X, Y: integer);
|
||||
var
|
||||
Cell: TGridCoord;
|
||||
@ -2482,6 +2491,50 @@ begin
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.DoSetColEdtBtn;
|
||||
var
|
||||
R:TRxColumn;
|
||||
i, w:integer;
|
||||
begin
|
||||
R:=SelectedColumn as TRxColumn;
|
||||
|
||||
if Assigned(Editor) and Assigned(R) then
|
||||
begin
|
||||
W:=0;
|
||||
for i:=0 to R.EditButtons.Count-1 do
|
||||
begin
|
||||
if R.EditButtons[i].Visible then
|
||||
W:=W+R.EditButtons[i].Width;
|
||||
end;
|
||||
|
||||
if W>0 then
|
||||
begin
|
||||
if Editor.Name = 'ButtonEditor' then
|
||||
begin
|
||||
Editor.Left:=Editor.Left - W;
|
||||
W:=Editor.Width + Editor.Left;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Editor.Width:=Editor.Width - W;
|
||||
W:=Editor.Width + Editor.Left;
|
||||
end;
|
||||
|
||||
for i:=0 to R.EditButtons.Count-1 do
|
||||
if R.EditButtons[i].Visible then
|
||||
begin
|
||||
R.EditButtons[i].FButton.Parent:=Self;
|
||||
R.EditButtons[i].FButton.Left:=W;
|
||||
R.EditButtons[i].FButton.Top:=Editor.Top;
|
||||
R.EditButtons[i].FButton.Height:=Editor.Height;
|
||||
R.EditButtons[i].FButton.Visible:=true;
|
||||
|
||||
W:=W+R.EditButtons[i].FButton.Width;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
procedure TRxDBGrid.DefaultDrawCellA(aCol, aRow: integer; aRect: TRect;
|
||||
aState: TGridDrawState);
|
||||
@ -4210,49 +4263,9 @@ begin
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.DoEditorShow;
|
||||
var
|
||||
R:TRxColumn;
|
||||
i, w:integer;
|
||||
begin
|
||||
inherited DoEditorShow;
|
||||
|
||||
R:=SelectedColumn as TRxColumn;
|
||||
|
||||
if Assigned(Editor) and Assigned(R) then
|
||||
begin
|
||||
W:=0;
|
||||
for i:=0 to R.EditButtons.Count-1 do
|
||||
begin
|
||||
if R.EditButtons[i].Visible then
|
||||
W:=W+R.EditButtons[i].Width;
|
||||
end;
|
||||
|
||||
if W>0 then
|
||||
begin
|
||||
if Editor.Name = 'ButtonEditor' then
|
||||
begin
|
||||
Editor.Left:=Editor.Left - W;
|
||||
W:=Editor.Width + Editor.Left;
|
||||
end
|
||||
else
|
||||
begin
|
||||
Editor.Width:=Editor.Width - W;
|
||||
W:=Editor.Width + Editor.Left;
|
||||
end;
|
||||
|
||||
for i:=0 to R.EditButtons.Count-1 do
|
||||
if R.EditButtons[i].Visible then
|
||||
begin
|
||||
R.EditButtons[i].FButton.Parent:=Self;
|
||||
R.EditButtons[i].FButton.Left:=W;
|
||||
R.EditButtons[i].FButton.Top:=Editor.Top;
|
||||
R.EditButtons[i].FButton.Height:=Editor.Height;
|
||||
R.EditButtons[i].FButton.Visible:=true;
|
||||
|
||||
W:=W+R.EditButtons[i].FButton.Width;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
DoSetColEdtBtn;
|
||||
end;
|
||||
|
||||
procedure TRxDBGrid.GetOnCreateLookup;
|
||||
|
Reference in New Issue
Block a user