RX: use access class to call protected methods, fix compilation due to lazarus r17564

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@611 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
jesusr
2008-11-24 16:30:21 +00:00
parent e2e80eac2d
commit 8ca84f58b5
2 changed files with 14 additions and 4 deletions

View File

@ -306,6 +306,12 @@ type
implementation implementation
uses VCLUtils, Math, rxdconst; uses VCLUtils, Math, rxdconst;
type
TDbGridAccess = class(TDbGrid)
end;
TPopUpFormAccess = class(TPopUpForm)
end;
{ TCustomDBLookupEdit } { TCustomDBLookupEdit }
@ -470,7 +476,7 @@ begin
case Key of case Key of
vk_Return: HideList; vk_Return: HideList;
else else
FList.KeyDown(Key, Shift); TDbGridAccess(FList).KeyDown(Key, Shift);
exit; exit;
end; end;
Key:=0; Key:=0;
@ -496,7 +502,7 @@ begin
begin begin
if Key=VK_RETURN then HideList if Key=VK_RETURN then HideList
else else
Flist.KeyDown(Key, Shift); TDbGridAccess(Flist).KeyDown(Key, Shift);
Key := 0; Key := 0;
end end
else else
@ -1008,7 +1014,7 @@ procedure TRxCustomDBLookupCombo.KeyDown(var Key: Word; Shift: TShiftState);
begin begin
if (Key in [VK_PRIOR, VK_NEXT, VK_UP, VK_DOWN, VK_RETURN, VK_HOME, VK_END]) and PopupVisible then if (Key in [VK_PRIOR, VK_NEXT, VK_UP, VK_DOWN, VK_RETURN, VK_HOME, VK_END]) and PopupVisible then
begin begin
FRxPopUpForm.KeyDown(Key, Shift); TPopUpFormAccess(FRxPopUpForm).KeyDown(Key, Shift);
{ if Key=VK_RETURN then { if Key=VK_RETURN then
HideList HideList
else else

View File

@ -180,6 +180,10 @@ function EditorTextMargins(Editor: TCustomMaskEdit): TPoint;
implementation implementation
uses lclintf, LCLStrConsts, rxconst, rxstrutils, LResources, Forms; uses lclintf, LCLStrConsts, rxconst, rxstrutils, LResources, Forms;
type
TPopupCalendarAccess = class(TPopupCalendar)
end;
function EditorTextMargins(Editor: TCustomMaskEdit): TPoint; function EditorTextMargins(Editor: TCustomMaskEdit): TPoint;
var var
DC: HDC; DC: HDC;
@ -640,7 +644,7 @@ begin
VK_ADD, VK_SUBTRACT]) and VK_ADD, VK_SUBTRACT]) and
PopupVisible then PopupVisible then
begin begin
FPopup.KeyDown(Key, Shift); TPopupCalendarAccess(FPopup).KeyDown(Key, Shift);
Key := 0; Key := 0;
end end
else else