implemented TListBox.TopIndex

git-svn-id: trunk@3739 -
This commit is contained in:
mattias 2002-12-27 10:23:40 +00:00
parent 3bcd792d80
commit e1ba27ef09
2 changed files with 16 additions and 6 deletions

View File

@ -5566,11 +5566,21 @@ begin
xtContext:
begin
Params.Flags:=[fdfSearchInParentNodes,fdfSearchInAncestors,
fdfTopLvlResolving,fdfFunctionResult]
+fdfAllClassVisibilities;
FindContext:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,
FindContext:=ExprType.Context;
if not (FindContext.Node.Desc in AllIdentifierDefinitions) then
begin
if (FindContext.Node.Parent<>nil)
and (FindContext.Node.Parent.Desc in AllIdentifierDefinitions) then
begin
FindContext.Node:=FindContext.Node.Parent;
end else begin
Params.Flags:=[fdfSearchInParentNodes,fdfSearchInAncestors,
fdfTopLvlResolving,fdfFunctionResult]
+fdfAllClassVisibilities;
FindContext:=ExprType.Context.Tool.FindBaseTypeOfNode(Params,
ExprType.Context.Node);
end;
end;
// ToDo: PPU, PPW, DCU

View File

@ -130,7 +130,7 @@ end;
function TCustomListBox.GetTopIndex: Integer;
begin
if HandleAllocated then
FTopIndex:=SendMessage(Handle, LB_GETTOPINDEX, 0, 0);
FTopIndex:=CNSendMessage(LB_GETTOPINDEX, Self, nil);
Result := FTopIndex;
end;
@ -142,7 +142,7 @@ begin
if FTopIndex=AValue then exit;
FTopIndex:=AValue;
if HandleAllocated then
SendMessage(Handle, LB_SETTOPINDEX, FTopIndex, 0);
CNSendMessage(LB_SETTOPINDEX, Self, Pointer(FTopIndex));
end;
{------------------------------------------------------------------------------