fix compile with last lcl from trunc

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1262 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2010-07-20 18:39:39 +00:00
parent a5c4deabef
commit 6967313448

View File

@ -36,7 +36,7 @@ unit rxlookup;
interface interface
uses uses
LCLType, LCLProc, LCLIntf, Classes, SysUtils, LResources, Forms, LCLType, LCLProc, LCLIntf, Classes, SysUtils, LResources, Forms, types,
Controls, Graphics, Dialogs, DB, EditBtn, DBGrids, StdCtrls, Buttons, Controls, Graphics, Dialogs, DB, EditBtn, DBGrids, StdCtrls, Buttons,
LMessages, DbCtrls, GraphType, dbutils, RxDbGrid, rxpopupunit, Themes; LMessages, DbCtrls, GraphType, dbutils, RxDbGrid, rxpopupunit, Themes;
@ -238,6 +238,10 @@ type
protected protected
procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer; procedure CalculatePreferredSize(var PreferredWidth, PreferredHeight: integer;
WithThemeSpace: Boolean); override; WithThemeSpace: Boolean); override;
{procedure GetPreferredSize(var PreferredWidth, PreferredHeight: integer;
Raw: boolean = false;
WithThemeSpace: boolean = true); override;
class function GetControlClassDefaultSize: TSize; override;}
procedure ShowList; virtual; procedure ShowList; virtual;
procedure OnInternalClosePopup(AResult:boolean);virtual; procedure OnInternalClosePopup(AResult:boolean);virtual;
procedure SetEnabled(Value: Boolean); override; procedure SetEnabled(Value: Boolean); override;
@ -1140,12 +1144,27 @@ begin
tmpCanvas := GetWorkingCanvas(Canvas); tmpCanvas := GetWorkingCanvas(Canvas);
try try
PreferredHeight:=Canvas.TextHeight('Wg')+12; PreferredHeight:=Canvas.TextHeight('Wg')+12;
//PreferredWidth:=Canvas.TextWidth('W')*12;
finally finally
if TmpCanvas<>Canvas then if TmpCanvas<>Canvas then
FreeWorkingCanvas(tmpCanvas); FreeWorkingCanvas(tmpCanvas);
end; end;
end; end;
{procedure TRxCustomDBLookupCombo.GetPreferredSize(var PreferredWidth,
PreferredHeight: integer; Raw: boolean; WithThemeSpace: boolean);
begin
inherited GetPreferredSize(PreferredWidth, PreferredHeight, Raw,
WithThemeSpace);
end;
class function TRxCustomDBLookupCombo.GetControlClassDefaultSize: TSize;
begin
Result.CX := 170;
Result.CY := 50;
end;
}
procedure TRxCustomDBLookupCombo.OnInternalClosePopup(AResult: boolean); procedure TRxCustomDBLookupCombo.OnInternalClosePopup(AResult: boolean);
begin begin
if Assigned(FRxPopUpForm) and AResult and (pfgColumnResize in FPopUpFormOptions.Options) then if Assigned(FRxPopUpForm) and AResult and (pfgColumnResize in FPopUpFormOptions.Options) then
@ -1289,12 +1308,12 @@ procedure TRxCustomDBLookupCombo.DoSetBounds(ALeft, ATop, AWidth,
AHeight: Integer); AHeight: Integer);
begin begin
if not (csReading in ComponentState) and (Height < GetMinHeight) then if not (csReading in ComponentState) and (Height < GetMinHeight) then
Height := GetMinHeight AHeight := GetMinHeight
else else
begin begin
if (csDesigning in ComponentState) then if (csDesigning in ComponentState) then
if (Height < GetMinHeight) then if (Height < GetMinHeight) then
Height := GetMinHeight; AHeight := GetMinHeight;
end; end;
inherited DoSetBounds(ALeft, ATop, AWidth, AHeight); inherited DoSetBounds(ALeft, ATop, AWidth, AHeight);
@ -1526,7 +1545,6 @@ var
ArrowBmp:TBitmap; ArrowBmp:TBitmap;
begin begin
inherited Create(AOwner); inherited Create(AOwner);
//Height := 23;
Width := 100; Width := 100;
AutoSize:=true; AutoSize:=true;
FUnfindedValue:=rxufNone; FUnfindedValue:=rxufNone;