Page 1 of 1

Increase Indent of Lists

Posted: Fri Mar 06, 2020 4:12 pm
by Jim Knopf
How can I increase/decrease the left indent of list elements?

Image

Re: Increase Indent of Lists

Posted: Sun Mar 08, 2020 11:14 am
by Sergey Tkachenko
Do you want to know how to change a list level? Or do you want to change an indent for the given list level?

Re: Increase Indent of Lists

Posted: Sun Mar 08, 2020 12:26 pm
by Jim Knopf
To change the indent for a given a list level

Re: Increase Indent of Lists

Posted: Sun Mar 08, 2020 3:14 pm
by Sergey Tkachenko
There is an important difference from MS Word.
In MS Word, you can change indents for the selected paragraphs, overriding indents specified in the list.
In TRichView, all paragraphs that use this list level have equal indents.
So the following list is allowed in MS Word and not allowed in TRichView:

Code: Select all

1. aaaa
    2. bbb
3.ccc
So you have two options:

1) Create a new list based on the current list, with all identical properties, but with a changed indents for the specified levels. Apply the list to the selected paragraphs.
This is how TrvActionParaList works (it displays a dialog allowing to modify list properties, including indents).
And this is how TRVRuler works (when you drag indent handles).
Pros: an undoable operation; it affects only the selected text.
Cons: not very good for numbered lists, if you apply to a part of it; new list has a new counter.

2) You can directly modify properties of RichViewEdit.ListStyles[].Levels[]. Then call RichViewEdit.Reformat.
Pros: you just changed indent, without list duplications
Cons: not undoable

In one of future updates, I plan to add changing list indents like in (2), but as an undoable operation, and TRVRuler will use these new functions.

Re: Increase Indent of Lists

Posted: Sun Mar 08, 2020 3:42 pm
by Jim Knopf
Thank you!