mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-30 05:50:30 +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);
|
procedure MakeVisible(PartialOK: Boolean);
|
||||||
function DisplayRect(Code: TDisplayCode): TRect;
|
function DisplayRect(Code: TDisplayCode): TRect;
|
||||||
function DisplayRectSubItem(subItem: integer;Code: TDisplayCode): TRect;
|
function DisplayRectSubItem(subItem: integer;Code: TDisplayCode): TRect;
|
||||||
|
function EditCaption: Boolean;
|
||||||
|
|
||||||
property Caption : String read GetCaption write SetCaption;
|
property Caption : String read GetCaption write SetCaption;
|
||||||
property Checked : Boolean read GetChecked write SetChecked;
|
property Checked : Boolean read GetChecked write SetChecked;
|
||||||
|
@ -373,6 +373,17 @@ begin
|
|||||||
LV, GetIndex, subItem, code);
|
LV, GetIndex, subItem, code);
|
||||||
end;
|
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 }
|
{ TListItem IntfUpdateText }
|
||||||
{------------------------------------------------------------------------------}
|
{------------------------------------------------------------------------------}
|
||||||
|
Loading…
Reference in New Issue
Block a user