Create lists from code
Posted: Fri Jun 16, 2017 8:30 am
Hello!
I need to create lists from code. I try to do it like this:
Where CreateBullets is a function from your "BulletsAndNumbering" demo.
The item appears, idented as it should, but there's no bullet or number in front of it. I know about ApplyListStyle method but I need to add lists to any TCustomRVData descendant, not just TRichViewRVData. Is there any way to do it?
I need to create lists from code. I try to do it like this:
Code: Select all
procedure TForm1.AddListItem(ARVData: TCustomRVData);
var marker: TRVMarkerItemInfo;
begin
marker := TRVMarkerItemInfo.CreateEx(ARVData, CreateBullets, 0, 1, True);
ARVData.AddItem('', marker);
ARVData.AddTextNL('Test list item', 0, -1, 0);
The item appears, idented as it should, but there's no bullet or number in front of it. I know about ApplyListStyle method but I need to add lists to any TCustomRVData descendant, not just TRichViewRVData. Is there any way to do it?