mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-27 04:22:27 +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:
|
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
|
||||||
|
|
||||||
|
@ -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;
|
||||||
|
|
||||||
{------------------------------------------------------------------------------
|
{------------------------------------------------------------------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user