mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 10:19:36 +02:00
LCL: Implement TListItem.EditCaption, issue #20295
git-svn-id: trunk@36676 -
This commit is contained in:
parent
d9ca0b833d
commit
7640a86947
@ -945,6 +945,7 @@ type
|
||||
procedure MakeVisible(PartialOK: Boolean);
|
||||
function DisplayRect(Code: TDisplayCode): TRect;
|
||||
function DisplayRectSubItem(subItem: integer;Code: TDisplayCode): TRect;
|
||||
function EditCaption: Boolean;
|
||||
|
||||
property Caption : String read GetCaption write SetCaption;
|
||||
property Checked : Boolean read GetChecked write SetChecked;
|
||||
|
@ -373,6 +373,17 @@ begin
|
||||
LV, GetIndex, subItem, code);
|
||||
end;
|
||||
|
||||
function TListItem.EditCaption: Boolean;
|
||||
var
|
||||
LV: TCustomListView;
|
||||
begin
|
||||
LV := FOwner.FOwner;
|
||||
LV.Selected := Nil; // First clear all selections,
|
||||
LV.Selected := Self; // then set this item as the only selected.
|
||||
if not LV.ReadOnly and Assigned(LV.FEditor) then
|
||||
LV.ShowEditor;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------}
|
||||
{ TListItem IntfUpdateText }
|
||||
{------------------------------------------------------------------------------}
|
||||
|
Loading…
Reference in New Issue
Block a user