Cleanup code in TRxDBLookupCombo.Paint

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@427 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2008-04-17 19:34:47 +00:00
parent f6f101c184
commit 2b2f2a581a
3 changed files with 8 additions and 5 deletions

View File

@ -35,6 +35,8 @@
+ In RxDBGrid property FixedHotColor now published
- fix error with empty sring in TRxDateEdit.
+ In property TRxDBLookupCombo.PopUpFormOptions add field AutoFillColumns. Used in dropdown list.
- Cleanup code in TRxDBLookupCombo.Paint
29.08.2007 - ������ 1.1.5.98 (svn revision 39)
+ In RxDBgrid - after close dataset list of SelectedRows is cleared
+ fix resaizing find form for RxDbGrd

View File

@ -42,6 +42,7 @@
- ���������� ������ � ��������� ������ ���� � ��������� ���.
+ � �������� PopUpFormOptions ���������� TRxDBLookupCombo ��������� ���� AutoFillColumns - ������ ������������ ����
�� TDBGrid - ������������ � ���������� ������
- ������� ��� � ��������� ���������� TRxDBLookupCombo
29.08.2007 - ������ 1.1.5.98 (svn revision 39)
+ � RxDBGrid ����� �������� ������ ������ ������ ���������� ����� (SelectedRows)
���������

View File

@ -10,6 +10,9 @@ uses
DB, EditBtn, DBGrids, StdCtrls, Buttons, LMessages, DbCtrls, GraphType,
dbutils, RxDbGrid, rxpopupunit;
const
TextMargin = 5;
type
TRxCustomDBLookupCombo = class;
@ -1136,7 +1139,7 @@ procedure TRxCustomDBLookupCombo.Paint;
var
Selected:boolean;
R, R1: TRect;
X, TextMargin: Integer;
// X: Integer;
AText: string;
begin
Canvas.Font := Font;
@ -1164,12 +1167,9 @@ begin
RxFrame3D(Canvas, R, clBtnShadow, clBtnFace, 1);
end;
TextMargin := 0;
if ClientWidth > 6 then
begin
SetRect(R1, 3, 3, ClientWidth - 3, ClientHeight - 3);
if TextMargin > 0 then Inc(TextMargin);
X := 3 + TextMargin;
Canvas.FillRect(R1);
R.Right:=R.Right - GetButtonWidth;
if FDisplayAll then
@ -1187,7 +1187,7 @@ begin
AText:=FValuesList[FLookupDisplayIndex]
else
AText:='';
Canvas.TextRect(R, X, Max(0, (HeightOf(R) - Canvas.TextHeight('Wg')) div 2), AText);
Canvas.TextRect(R, TextMargin, Max(0, (HeightOf(R) - Canvas.TextHeight('Wg')) div 2), AText);
end
end;
end;