implemented ListBoxGetItemRect for win32 (fixes issue #7224)

git-svn-id: trunk@9730 -
This commit is contained in:
vincents 2006-08-18 12:14:51 +00:00
parent 71e5337167
commit 3f490c687d
2 changed files with 10 additions and 0 deletions

View File

@ -244,4 +244,13 @@ begin
end;
end;
function TWin32WidgetSet.GetListBoxItemRect(ListBox: TComponent;
Index: integer; var ARect: TRect): boolean;
begin
Result := false;
if ListBox is TCustomListBox then
Result := Windows.SendMessage(TCustomListBox(ListBox).Handle,
LB_GETITEMRECT, Index, LPARAM(@ARect)) <> LB_ERR;
end;
//##apiwiz##eps## // Do not remove, no wizard declaration after this line

View File

@ -41,6 +41,7 @@ procedure DrawArrow(Arrow: TComponent; Canvas: TPersistent); override;
function GetAcceleratorString(const AVKey: Byte; const AShiftState: TShiftState): String; override;
function GetControlConstraints(Constraints: TObject): boolean; override;
function GetListBoxIndexAtY(ListBox: TComponent; y: integer): integer; override;
function GetListBoxItemRect(ListBox: TComponent; Index: integer; var ARect: TRect): boolean; override;
procedure RemoveEventHandler(var AHandler: PEventHandler); override;
procedure RemovePipeEventHandler(var AHandler: PPipeEventHandler); override;