Drag drop Marker

General TRichView support forum. Please post your questions here
Post Reply
bflorac
Posts: 1
Joined: Tue Nov 24, 2020 7:30 am

Drag drop Marker

Post by bflorac »

I'm working on a app that I want a rich edit that is limited to just a single marker list with various levels. Each list item as an icon used from a list style. I would like a user to be able to click on the icon and drag the item from one point to another. I can't seem to find a way to make this occur. Any suggestions?
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Drag drop Marker

Post by Sergey Tkachenko »

Well, you can fill the editor with the desired content and make it read-only.
You can drag data from an editor to other places. The demos are here: https://www.trichview.com/forums/viewto ... f=3&t=3407

But there are problems:
1) Like in most editors, list bullets cannot be selected; you can select only content bulleted paragraphs.
Possible solution: do not use true bullets&numbering, use text or images instead.
2) Any content can be selected and dragged. For example, multiple bulleted paragraphs.
Possible solution: use OnSelect event to adjust selection. In this event, use SetSelectionBounds to select only a desired content (set some flag to prevent infinite recursion)
Post Reply