Increase Indent of Lists

General TRichView support forum. Please post your questions here
Post Reply
Jim Knopf
Posts: 241
Joined: Mon Dec 30, 2013 10:07 pm
Location: Austria
Contact:

Increase Indent of Lists

Post by Jim Knopf »

How can I increase/decrease the left indent of list elements?

Image
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Increase Indent of Lists

Post 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?
Jim Knopf
Posts: 241
Joined: Mon Dec 30, 2013 10:07 pm
Location: Austria
Contact:

Re: Increase Indent of Lists

Post by Jim Knopf »

To change the indent for a given a list level
Sergey Tkachenko
Site Admin
Posts: 17559
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Re: Increase Indent of Lists

Post 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.
Jim Knopf
Posts: 241
Joined: Mon Dec 30, 2013 10:07 pm
Location: Austria
Contact:

Re: Increase Indent of Lists

Post by Jim Knopf »

Thank you!
Post Reply