Commit 7640a869 authored by Juha Manninen's avatar Juha Manninen
Browse files

LCL: Implement TListItem.EditCaption, issue #20295

git-svn-id: trunk@36676 -
parent d9ca0b83
......@@ -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 }
{------------------------------------------------------------------------------}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment