mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-26 15:00:26 +02:00
implemented TListBox.TopIndex
git-svn-id: trunk@3739 -
This commit is contained in:
parent
3bcd792d80
commit
e1ba27ef09
@ -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
|
||||
|
||||
|
@ -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;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user