Converter: Use OnPrepareCanvas instead of OnDrawCell handler for changing text color.

git-svn-id: trunk@27283 -
This commit is contained in:
juha 2010-09-08 09:55:27 +00:00
parent af63bc2037
commit 97eddada84
2 changed files with 8 additions and 9 deletions

View File

@ -62,7 +62,7 @@ object ReplaceFuncsForm: TReplaceFuncsForm
PopupMenu = PopupMenu1
RowCount = 2
TabOrder = 1
OnDrawCell = GridDrawCell
OnPrepareCanvas = GridPrepareCanvas
ColWidths = (
100
150
@ -77,15 +77,14 @@ object ReplaceFuncsForm: TReplaceFuncsForm
AnchorSideRight.Control = Splitter1
AnchorSideBottom.Control = ButtonPanel
Left = 0
Height = 546
Top = 29
Height = 544
Top = 31
Width = 157
Anchors = [akTop, akLeft, akRight, akBottom]
BorderSpacing.Top = 5
ItemHeight = 0
OnClickCheck = CategoryListBoxClickCheck
TabOrder = 2
TopIndex = -1
end
object Splitter1: TSplitter
Left = 157
@ -96,9 +95,9 @@ object ReplaceFuncsForm: TReplaceFuncsForm
end
object CategoriesLabel: TLabel
Left = 6
Height = 16
Height = 18
Top = 8
Width = 131
Width = 149
Caption = 'Categories to convert :'
Font.Height = -13
ParentColor = False

View File

@ -83,7 +83,7 @@ type
procedure PopupMenu1Popup(Sender: TObject);
procedure InsertRow1Click(Sender: TObject);
procedure DeleteRow1Click(Sender: TObject);
procedure GridDrawCell(Sender: TObject; aCol, aRow: Integer; aRect: TRect;
procedure GridPrepareCanvas(sender: TObject; aCol, aRow: Integer;
aState: TGridDrawState);
procedure GridEditingDone(Sender: TObject);
procedure GridSetEditText(Sender: TObject; ACol, ARow: Integer; const Value: string);
@ -388,8 +388,8 @@ begin
Grid.DeleteColRow(False, Grid.Row);
end;
procedure TReplaceFuncsForm.GridDrawCell(Sender: TObject; aCol, aRow: Integer;
aRect: TRect; aState: TGridDrawState);
procedure TReplaceFuncsForm.GridPrepareCanvas(sender: TObject;
aCol, aRow: Integer; aState: TGridDrawState);
var
SGrid: TStringGrid;
Categ: string;