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: xtContext:
begin begin
Params.Flags:=[fdfSearchInParentNodes,fdfSearchInAncestors, FindContext:=ExprType.Context;
fdfTopLvlResolving,fdfFunctionResult] if not (FindContext.Node.Desc in AllIdentifierDefinitions) then
+fdfAllClassVisibilities; begin
FindContext:=ExprType.Context.Tool.FindBaseTypeOfNode(Params, 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); ExprType.Context.Node);
end;
end;
// ToDo: PPU, PPW, DCU // ToDo: PPU, PPW, DCU

View File

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